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 » U++ Library support » Look and Chameleon Technology » Chameleon again
Re: Chameleon again [message #24474 is a reply to message #24473] Mon, 18 January 2010 20:20 Go to previous messageGo to previous message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
Quote:

This System skins are not images and do not have hot spots. It is more like "take this are and please fill it with the look of widget X in state Y". It is a lot more complicated than this. And there was probably a healthy amount of guess work and trial and error involved until look under Windows got as good as it is now.
Isn't simple and also portable to ignore hotspots at all?
I mean, if we use system paint (DrawBackgroundTheme and gtk equivalent [don't have one Confused but it's possible to "emulate"]) during resize events (how often we resize? this doesn't introduce too much overhead) and once the size is stabilized store images in cache and paint them from there when Over, Clicked etc. events happen. I know it doesn't introduce overhead because widgets in gtk and msw use this intensely, no cache is used.
That have drawbacks anyway. If i understand well, during Paint event in U++ the Button image is scaled to the current size of the button and painted on Drawing area. It means after the resized image is drawn it's freed from memory, so it use less memory how it's implemented now but use more CPU time because of scaling. If method described by me would be used then CPU used time will be minimum but memory usage is increased. My method is more efficient if we have to deal with custom themes where we don't know where a hotspot should be placed in image in order to have a good look. AFAIK hotspots are fixed so if a theme use a different larger border or different style for a button the chameleon will fail to acquire system look.

Andrei
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FEATURE_REQUEST: SliderCtrl to have WhenClick
Next Topic: upp-x11-src-1965.tar.gz and compiling under Debian Lenny
Goto Forum:
  


Current Time: Sat May 18 19:02:29 CEST 2024

Total time taken to generate the page: 0.01428 seconds