Browse Source

Toolbar: Change the background colour of CustomisationDialog, make it configurable

v7.0.12
attila 2 years ago
parent
commit
31dfb05ea3
5 changed files with 30 additions and 2 deletions
  1. +21
    -0
      BREAKING_CHANGES.md
  2. +1
    -0
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp
  3. +1
    -0
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp
  4. +4
    -1
      modules/juce_gui_basics/widgets/juce_Toolbar.cpp
  5. +3
    -1
      modules/juce_gui_basics/widgets/juce_Toolbar.h

+ 21
- 0
BREAKING_CHANGES.md View File

@@ -2,6 +2,27 @@


# develop # develop


## Change

The background colour of the Toolbar::CustomisationDialog has been changed from
white to a new, customisable value, that matches Toolbar::backgroundColourId by
default.

**Possible Issues**

User interfaces that use Toolbar::CustomisationDialog will render differently.

**Workaround**

You can customise the new colour using LookAndFeel::setColour() using
Toolbar::customisationDialogBackgroundColourId.

**Rationale**

Previously there was no way to customise the dialog's background colour and the
fixed white colour was inappropriate for most user interfaces.


## Change ## Change


ProfileHost::enableProfile and ProfileHost::disableProfile have been combined ProfileHost::enableProfile and ProfileHost::disableProfile have been combined


+ 1
- 0
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp View File

@@ -131,6 +131,7 @@ LookAndFeel_V2::LookAndFeel_V2()
Toolbar::buttonMouseDownBackgroundColourId, 0x800000ff, Toolbar::buttonMouseDownBackgroundColourId, 0x800000ff,
Toolbar::labelTextColourId, 0xff000000, Toolbar::labelTextColourId, 0xff000000,
Toolbar::editingModeOutlineColourId, 0xffff0000, Toolbar::editingModeOutlineColourId, 0xffff0000,
Toolbar::customisationDialogBackgroundColourId, 0xfff6f8f9,
DrawableButton::textColourId, 0xff000000, DrawableButton::textColourId, 0xff000000,
DrawableButton::textColourOnId, 0xff000000, DrawableButton::textColourOnId, 0xff000000,


+ 1
- 0
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp View File

@@ -1431,6 +1431,7 @@ void LookAndFeel_V4::initialiseColours()
Toolbar::buttonMouseDownBackgroundColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).contrasting (0.5f).getARGB(), Toolbar::buttonMouseDownBackgroundColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).contrasting (0.5f).getARGB(),
Toolbar::labelTextColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(), Toolbar::labelTextColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(),
Toolbar::editingModeOutlineColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::outline).getARGB(), Toolbar::editingModeOutlineColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::outline).getARGB(),
Toolbar::customisationDialogBackgroundColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).getARGB(),
DrawableButton::textColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(), DrawableButton::textColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(),
DrawableButton::textColourOnId, currentColourScheme.getUIColour (ColourScheme::UIColour::highlightedText).getARGB(), DrawableButton::textColourOnId, currentColourScheme.getUIColour (ColourScheme::UIColour::highlightedText).getARGB(),


+ 4
- 1
modules/juce_gui_basics/widgets/juce_Toolbar.cpp View File

@@ -660,7 +660,10 @@ class Toolbar::CustomisationDialog final : public DialogWindow
{ {
public: public:
CustomisationDialog (ToolbarItemFactory& factory, Toolbar& bar, int optionFlags) CustomisationDialog (ToolbarItemFactory& factory, Toolbar& bar, int optionFlags)
: DialogWindow (TRANS ("Add/remove items from toolbar"), Colours::white, true, true),
: DialogWindow (TRANS ("Add/remove items from toolbar"),
bar.findColour (Toolbar::customisationDialogBackgroundColourId),
true,
true),
toolbar (bar) toolbar (bar)
{ {
setContentOwned (new CustomiserPanel (factory, toolbar, optionFlags), true); setContentOwned (new CustomiserPanel (factory, toolbar, optionFlags), true);


+ 3
- 1
modules/juce_gui_basics/widgets/juce_Toolbar.h View File

@@ -246,8 +246,10 @@ public:
labelTextColourId = 0x1003240, /**< A colour to use for drawing the text under buttons labelTextColourId = 0x1003240, /**< A colour to use for drawing the text under buttons
when the style is set to iconsWithText or textOnly. */ when the style is set to iconsWithText or textOnly. */
editingModeOutlineColourId = 0x1003250 /**< A colour to use for an outline around buttons when
editingModeOutlineColourId = 0x1003250, /**< A colour to use for an outline around buttons when
the customisation dialog is active and the mouse moves over them. */ the customisation dialog is active and the mouse moves over them. */
customisationDialogBackgroundColourId = 0x1003260 /**< A colour used to paint the background of the CustomisationDialog. */
}; };
//============================================================================== //==============================================================================


Loading…
Cancel
Save