People often need to write custom UIs that involve doing something beyond the scope of the current LookAndFeel class, and might involve me adding methods or otherwise tweaking the L+F.
So please use this thread to post requests for things like colour IDs that should be added, methods that need extra parameters, etc. and I’ll try to keep up with any sensible requests!
My first request is a getTooltipWindowFlags() which would be called in the TooltipWindow constructor such as the getMenuWindowFlags() like this:
if (parentComponent != 0)
setSize (1, 1); // to keep the OS happy by not having zero-size windows
addToDesktop (ComponentPeer::windowIsTemporary | getLookAndFeel().getMenuWindowFlags());
The second is a way to set the PopupMenuWindow transparent when the drop shadow is disabled. But I don’t know how to do that beacause we have to be sure that the drop shadow is disabled before set it transparent.
i would like something like this. we have no way to change default row height for ListBox contained in FileListComponent:
int LookAndFeel::getFileListComponentRowHeight ()
must be triggered on the lookAndFeelChanged callback of the FileListComponent i think.
I’d appreciate colour IDs for DrawableButton’s background colours. At the moment they’re hard-coded and you need to call setBackgroundColours() to change them.
In some cases it would be useful to alert the user to unitialised or empty combos that would pop out from a group of components. E.g. an ‘empty’ or ‘not selected’ background colour (defaulting to the normal colour) would be nice.
Along these lines, maybe the sliders could use an alternative colour, which would be triggered by a min and/or max value.
(this is not really for L&F class, but belongs here, I guess)
I think it would be very useful, if somehow Components could be told what LookAndFeel class to choose from at runtime. So one could have (for instance) different looking TextButtons in one app.
like the already existing Component::setLookAndFeel for example ?
i reckon the ultimate would be to merge some of the drawing<->xml code from the Jucer with a LookAndFeel, allowing a L&F to be specified from an XML document. The challenges faced at ensuring it works should surely expose all weak spots that need addressing, as well as providing a [obviously slightly inefficient] skinning system.
Gosh, I didn’t know that method existed… I knew LookAndFeel::setDefaultLookAndFeel() only. Please ignore my post.
Hi, I need, that you would add the following colour IDs:
Apart fom LookAndFeel, it would be cool if one could assign an integer tag/id to each component and retrieve the component based upon that tag/id.
ComboBox::labelColourId would be useful for me.
Please add the following colour IDs:
The ResizableWindow already has a way of specifying the background colour, and doesn’t draw any text, so not sure about why you need those…
And for a tabbed component, it lets you change the colour of each tab individually, so a global tab colour doesn’t really apply. I guess it could let you set a default tab colour, but that would involve changing the addTab method to remove the colour parameter, and breaking a lot of code.
The minimum height of a menu item is restricted in PopupMenuWindow::addItem() by:
I would like to have that minimum height set to 1px (but that may break someones menus), or be configurable by the LookAndFeel:
I hit this minimal height limit, because I want menu separators to be smaller than 10px in my custom LookAndFeel.
It does seem a bit hard-coded, and could easily be less than 10 without doing any harm, I think. I doubt if there are any custom components that set their size to less than 10…
I’d like to create a subclass of MidiKeyboardComponent that would delegate its drawing to a custom LnF however I can’t because MidiKeyboardComponent::getKeyPos is private.
protected or friend class LookAndFeel should be enough for me.
If you feel like factoring the drawing code from MidiKeyboardComponent into the LookAndFeel I’m all for it too.
Can’t you do what you need with drawUpDownButton(), getKeyPosition(), etc?