mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
Introjucer: improved some rollover help.
This commit is contained in:
parent
7829d1e4bf
commit
74eb65090f
2 changed files with 22 additions and 2 deletions
|
|
@ -114,7 +114,8 @@ public:
|
|||
if (projectType.isGUIApplication() && ! iOS)
|
||||
{
|
||||
props.add (new TextPropertyComponent (getSetting ("documentExtensions"), "Document file extensions", 128, false),
|
||||
"A comma-separated list of file extensions for documents that your app can open.");
|
||||
"A comma-separated list of file extensions for documents that your app can open. "
|
||||
"Using a leading '.' is optional, and the extensions are not case-sensitive.");
|
||||
}
|
||||
else if (iOS)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -160,6 +160,25 @@ public:
|
|||
rootItem->deleteAllSelectedItems();
|
||||
}
|
||||
|
||||
void setEmptyTreeMessage (const String& newMessage)
|
||||
{
|
||||
if (emptyTreeMessage != newMessage)
|
||||
{
|
||||
emptyTreeMessage = newMessage;
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
void paint (Graphics& g)
|
||||
{
|
||||
if (emptyTreeMessage.isNotEmpty() && (rootItem == nullptr || rootItem->getNumSubItems() == 0))
|
||||
{
|
||||
g.setColour (findColour (mainBackgroundColourId).contrasting (0.7f));
|
||||
g.setFont (13.0f);
|
||||
g.drawFittedText (emptyTreeMessage, getLocalBounds().reduced (4, 2), Justification::centred, 50);
|
||||
}
|
||||
}
|
||||
|
||||
void resized()
|
||||
{
|
||||
tree.setBounds (getAvailableBounds());
|
||||
|
|
@ -174,7 +193,7 @@ public:
|
|||
ScopedPointer<JucerTreeViewBase> rootItem;
|
||||
|
||||
private:
|
||||
String opennessStateKey;
|
||||
String opennessStateKey, emptyTreeMessage;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue