LookAndFeel requests


#1

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!


#2

Hi Jules,
My first request is a getTooltipWindowFlags() which would be called in the TooltipWindow constructor such as the getMenuWindowFlags() like this:

if (parentComponent != 0) { parentComponent->addChildComponent (this); } else { 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.

Kevin


#3

i would like something like this. we have no way to change default row height for ListBox contained in FileListComponent:

int LookAndFeel::getFileListComponentRowHeight ()
{
    return 22;
}

must be triggered on the lookAndFeelChanged callback of the FileListComponent i think.


#4

so,

here is my treeview indentation request:
http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=2807

and

the need for isOpen in drawFileBrowserRow:
http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=2948


#5

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.

Cheers,

  • Niall.

#6

Hi Jules,

Just want to put this request here:

http://rawmaterialsoftware.com/juceforum/viewtopic.php?t=2960


#7

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)

Thanks!


#8

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.


#9

like the already existing Component::setLookAndFeel for example ?


#10

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.


#11

Gosh, I didn’t know that method existed… I knew LookAndFeel::setDefaultLookAndFeel() only. Please ignore my post.


#12

Hi, I need, that you would add the following colour IDs:

ResizableWindow::backgroundColourId
ResizableWindow::textColourId

TabbedComponent::backgroundColourId
TabbedComponent::textColourId
TabbedComponent::highlightColourId
TabbedComponent::highlightedTextColourId


#13

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.


#14

ComboBox::labelColourId would be useful for me.


#15

Please add the following colour IDs:

ResizableWindow::backgroundColourId
ResizableWindow::textColourId

TabbedComponent::backgroundColourId
TabbedComponent::textColourId
TabbedComponent::highlightColourId
TabbedComponent::highlightedTextColourId


#16

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.


#17

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.


#18

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…


#19

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.


#20

Can’t you do what you need with drawUpDownButton(), getKeyPosition(), etc?