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 » U++ Widgets - General questions or Mixed problems » Appearance of disabled Button/ButtonOption does not match when using images
Appearance of disabled Button/ButtonOption does not match when using images [message #7604] Tue, 09 January 2007 19:11 Go to previous message
James Thomas is currently offline  James Thomas
Messages: 26
Registered: June 2006
Promising Member
Tested with 612-dev3.

The image shading is different. In Button the Image is Etched (lighter and inset), but not in ButtonOption. I'm not sure if this is a mistake and not a deliberate decision since the code has been re-written for chameleon recently, but since I need them to look identical for the control set below I have found the fix.

In ButtonOption::Paint the line:
w.DrawImage(p.x, p.y, (option && !IsNull(image1)) ? image1 : image);

should be something like:
w.DrawImage(p.x, p.y, (option && !IsNull(image1)) ? image1 : IsEnabled() ? image : MakeImage(image, Etched));


The old code used DrawXPButton which also has an error when drawing the background color in the same case:
	case BUTTON_DISABLED:
		frame = SColorDisabled;
		outlight = outshade = light = shade = SColorFace;
		break;

should be:
	case BUTTON_DISABLED:
		frame = SColorDisabled;
		outlight = outshade = light = shade = Blend(SColorLight, SColorFace);
		break;

Also, IMO the old code had a much nicer effect when the push button was depressed (though it didn't match XP):
http://img247.imageshack.us/img247/2241/enabledbuttonssg7.jpg
Would it be difficult for me to reproduce this behaviour whilst still using the rest of the Chameleon code?

Cheers.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to get rid of the "minimal size limitation" of TopWindow?
Next Topic: How to find the top-most window the mouse is over (Linux)?
Goto Forum:
  


Current Time: Thu May 16 07:32:33 CEST 2024

Total time taken to generate the page: 0.02809 seconds