Friday, March 23rd 2018, 6:28am UTC+1

You are not logged in.

  • Login
  • Register



Date of registration: Aug 3rd 2016

Posts: 23


Friday, March 9th 2018, 3:24pm

Day/night mode implementation with multiple skin properties existing for multiple set of butons

Hi all,

Please refer our earlier post
Query on automatic color inversion

We have implemented a design for day/night mode feature in our application.
The main bottleneck is struggling with button skinning properties.

In our application, different types of buttons exists -
Some set of coloured buttons - eg: showing red colour for high priority, yellow for medium/low priority - behaviour should be the same for day/night mode.
Some set of buttons exists in popup windows - whose skin is different from other buttons for day and night mode.
Also we have normal set of buttons - which is possessing a set of skin props for its day/night mode.

Problem now is:- As we have this multiple set of skin properties available and pressing a day/night mode button or when a paint/invalidate window occurs for any of these types of buttons, that particular button property take into effect globally. This is killing our existing design. So we have to patch the entire application to call these button skinning set property API to call a hundred times here and there (eg: During WM_PAINT for some set of windows, while switching to a window for other set of windows, during day/night mode button press on yet another set of windows) to make the button to behave as we expect.

Even then, at particular times, for eg:- continuous testing of day/night mode feature in all UI screens, we would find any couple of buttons behave unexpectedly. eg:- if all buttons in white color, one button would be odd.. like in black color.

Our text color, window color and almost every widget colors work as we expect with our day/night feature design.

So we certainly believe button skinning feature is the core issue in our day/night mode feature implementation.

We are using BUTTON_SetSkinFlexProps() through out to set button skin props. In one window, we have used BUTTON_SetSkin() and a custom draw function.

We have also gone through the sample code provided in this link:-
How to program different skins for different buttons in the same window

We feel this is a simple application in a single window.

We need this kind of a thing with multiple windows. Also need to implement a day/night mode kind of thing.
Could you please share your valuable thoughts on this? We would appreciate if you can share any sample code implementing a similar scenario.

Thank you,



Date of registration: Aug 3rd 2016

Posts: 23


Sunday, March 11th 2018, 9:12am

Button skin flex issue

Saw this new query in the forum.

Yeah. This is the kind of issue we also face.
Only thing is our application has several UI screens, in which some of them are virtual screens and we do have different buttons possessing different skin properties..

Please do help us to sort out this button issue during day night mode implementation. We are still waiting for your reply.

Thank you,