Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Dynamic theme changes
Re: Dynamic theme changes [message #61275 is a reply to message #61230] Wed, 18 December 2024 23:22 Go to previous message
Didier is currently offline  Didier
Messages: 728
Registered: November 2008
Location: France
Contributor
Just to share my little experience with dynamic theme changing.
There are some traps (at least one in which I fell Smile ):

If you use a Value to store a specific Style (to paint a rect for example): Value can store a Color, an Image, a function. Then it doesn't get modified when dynamic skin changes.

If you stored an Image inside the Value: things work out of the box Smile
If you stored a Color inside the Value, the solution is simply to make an AColor instead of Color and it just works out of the box Smile


Example:
struct MyCtrlStyle : ChStyle<MyCtrlStyle> {
	Value    plotBckgndStyle;
};

...
Replace:
plotBckgndStyle = Blend(SColorShadow(), SColorPaper(), 190);

with:
plotBckgndStyle = AColor( Blend(SColorShadow(), SColorPaper(), 190));


[Updated on: Wed, 18 December 2024 23:30]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ide: Multiline cursor
Next Topic: ide: git file history now displays author / commit info per line
Goto Forum:
  


Current Time: Fri Jun 20 20:17:23 CEST 2025

Total time taken to generate the page: 0.02520 seconds