Home » U++ Library support » Look and Chameleon Technology » native look
native look [message #466] |
Wed, 04 January 2006 13:24 |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
Hi,
I am very new to U++, I have been playing with Qt4 for a few months now. When coming from Qt background these things are immediately visible:
- both compilation times and runtime performance is far better than in Qt.
- library source code is much smaller than in Qt. In the beginning I was suspecting that I am only seeing a small subset of the code.
- U++ applications have a distinct look which does not match the native Windows 2k look to the extent Qt does. Some examples are arrows in the combo boxes, the file open dialog, radio buttons, scrollbars
I see that there are substantial amount of quality work invested in the library. Compared to all this work it seems a minor effort to mimic the OS look more precisely. Am I speculating correctly if I say that this was intentional choice by the library authors, because they like this look better than the OS native? This seems to be a matter of personal taste. I respect your taste, but my preference would be to develop applications which matches the native look better. The reason is the Rule of Least Surprise: http://www.westnet.com/~gsmith/ppt/ppt23.htm
My question is: is there any option/add-on/existing application to mimic the native OS look more precisely or is such planned for U++?
best regards,
Sandor
|
|
|
|
Re: native look [message #970 is a reply to message #468] |
Sat, 11 February 2006 13:18 |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
I modified CtrlLib/Ctrl.iml to make radio buttons, checkboxes & scrollbar look more native is Win2000 style. I modified these images:
switch0, switch0d, switch0f, switch1, switch1d, switch1f,
optionedge, optionedged,
smallup, smalldown, smallleft, smallright
The original images were renamed by appending a "_custom" to the end, for example switch0_custom. I left in some non-native look, such as the yellow hotspot color: I think that is good, and does not seem alien.
If you think that the original "improvements" to the radio buttons & checkboxes are no longer justified, then could you replace Ctrl.iml with this file, and maybe remove the "_custom" images?
But if you still like the custom look, maybe a command line option, or macro could be made which triggers either the custom look or the native look images. I searched in the code, and there are very few places where these image names are used (Button.cpp, Switch.cpp), so extending them to deal with two versions would not seem much work. I still think that the native look should be the default. One ide for the implementation (part of Switch.cpp):
#ifndef CUSTOM_LOOK
#define CUSTOM_LOOK_IMAGE(imageName) imageName
#else
#define CUSTOM_LOOK_IMAGE(imageName) imageName##_custom
#endif
...
img = v.value == value ? dv ? CtrlImg::CUSTOM_LOOK_IMAGE(switch1d)()
: pushindex == i ? CtrlImg::CUSTOM_LOOK_IMAGE(switch1f)()
: CtrlImg::CUSTOM_LOOK_IMAGE(switch1)()
: dv ? CtrlImg::CUSTOM_LOOK_IMAGE(switch0d)()
: pushindex == i ? CtrlImg::CUSTOM_LOOK_IMAGE(switch0f)()
: CtrlImg::CUSTOM_LOOK_IMAGE(switch0)();
-
Attachment: Ctrl.iml.zip
(Size: 12.30KB, Downloaded 1992 times)
|
|
|
|
|
Goto Forum:
Current Time: Sat Dec 14 14:06:37 CET 2024
Total time taken to generate the page: 0.01380 seconds
|