norgepaul / TChromeTabs

Comprehensive Delphi implementation of Chrome's tab system
Other
215 stars 78 forks source link

Add Button does not reflect changing LookAndFeel colors at runtime #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I change the look and feel of the Add Button at run time to specify new 
colors, the button does not repaint with the new colors after calling the 
TChromeTab controls Invalidate() procedure (changing other LookAndFeel colors 
and invalidating the control works as expected). 

The button does change to the new colors after a mouse over or click event, but 
not programatically via Invalidate(). 

My use case is to update the control colors on Windows 8 and above to match the 
UI style when a model window is displayed over a TChromeTabsGlassForm 
containing a tab bar, so I am relying on Invalidate the trigger the repaint and 
not mouse events.

Have I missed something or is this a small bug in the control?

Original issue reported on code.google.com by stevefe...@gmail.com on 13 Nov 2014 at 5:23

GoogleCodeExporter commented 9 years ago
Current workaround is to issue a call to TCustomChromeTabs.Resize after 
updating the colors for a button, this in turn triggers 
TBaseChromeButtonControl.SetDrawState which will actually update the buttons 
colors and the button will redraw as expected.

I guess the add and scroll buttons need a call to SetDrawState with force 
update after their look and feel have been invalidated.

Original comment by stevefe...@gmail.com on 14 Nov 2014 at 10:43

GoogleCodeExporter commented 9 years ago

Original comment by paul.tho...@easy-ip.net on 14 Nov 2014 at 3:58

GoogleCodeExporter commented 9 years ago
Awesome, thanks for the patch :)

Original comment by stevefe...@gmail.com on 14 Nov 2014 at 7:02