Home » U++ Library support » Menus&Toolbars » DropList in Toolbar
Re: DropList in Toolbar [message #19578 is a reply to message #19534] |
Thu, 18 December 2008 11:26  |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
mrjt wrote on Fri, 12 December 2008 05:08 |
luzr wrote on Thu, 11 December 2008 14:03 |
Debatable.
I think when puttin DropList to ToolBar, you need to set the width anyway. That is why there is
void Add(Ctrl& ctrl, int cx, int cy = 0);
variant. cy is minsize, you just need to put cx.
BTW, the REAL problem there is that I am undecided whether cx, cy should be altered by font zoom...
Mirek
|
While it's true that getting the best result will require setting the size yourself, you should at least be able to get something useable without it.
At the moment DropList::MinSize may as well return cx = 0 for all the use it is. And I'm personally convinced that the default should be StdSize anyway, which as I understand it is supposed to be a Ctrl's best guess as to the correct size. Most Ctrl's simply return MinSize but for those that implement it the result will be much better.
This isn't really a major issue in this case, but I have some issues with the general inconsistency in the use of MinSize/StdSize, and the missing implementations of the latter. At the end of the day I could fix most of this myself and submit a patch though.
|
I definitely agree about MinSize/StdSize issue. I think this should be addressed.
BTW, one nice method for "complex cases" is to use NilDraw and copy Paint to DoPaint, adding max size gathering - you do not have to duplicate all the placement logic then.
Mirek
|
|
|
Goto Forum:
Current Time: Sun May 11 12:25:01 CEST 2025
Total time taken to generate the page: 0.03838 seconds
|