diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index aca7ef9474..54e9ff450d 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -2,6 +2,27 @@ # 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 ProfileHost::enableProfile and ProfileHost::disableProfile have been combined diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index c44236fb53..1440864278 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -131,6 +131,7 @@ LookAndFeel_V2::LookAndFeel_V2() Toolbar::buttonMouseDownBackgroundColourId, 0x800000ff, Toolbar::labelTextColourId, 0xff000000, Toolbar::editingModeOutlineColourId, 0xffff0000, + Toolbar::customisationDialogBackgroundColourId, 0xfff6f8f9, DrawableButton::textColourId, 0xff000000, DrawableButton::textColourOnId, 0xff000000, diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp index d005ca6a54..58dbd14762 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp @@ -1431,6 +1431,7 @@ void LookAndFeel_V4::initialiseColours() Toolbar::buttonMouseDownBackgroundColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).contrasting (0.5f).getARGB(), Toolbar::labelTextColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).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::textColourOnId, currentColourScheme.getUIColour (ColourScheme::UIColour::highlightedText).getARGB(), diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp index d02db8607d..8a1a5547e7 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp @@ -660,7 +660,10 @@ class Toolbar::CustomisationDialog final : public DialogWindow { public: 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) { setContentOwned (new CustomiserPanel (factory, toolbar, optionFlags), true); diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.h b/modules/juce_gui_basics/widgets/juce_Toolbar.h index ffc9ef4d42..b9d92ac74a 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.h +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.h @@ -246,8 +246,10 @@ public: labelTextColourId = 0x1003240, /**< A colour to use for drawing the text under buttons 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. */ + + customisationDialogBackgroundColourId = 0x1003260 /**< A colour used to paint the background of the CustomisationDialog. */ }; //==============================================================================