From 5fb78e30ac84d6c72cb5f35b1356f25d08e5bbed Mon Sep 17 00:00:00 2001 From: Anthony Nicholls Date: Tue, 21 Mar 2023 17:47:25 +0000 Subject: [PATCH] Component: update docs to reflect what happens when the look-and-feel changes --- .../components/juce_Component.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 32116127e1..0d372774f1 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -1168,14 +1168,14 @@ public: Calling this method will also invoke the sendLookAndFeelChange() method. - @see getLookAndFeel, lookAndFeelChanged + @see getLookAndFeel, lookAndFeelChanged, sendLookAndFeelChange */ void setLookAndFeel (LookAndFeel* newLookAndFeel); /** Called to let the component react to a change in the look-and-feel setting. - When the look-and-feel is changed for a component, this will be called in - all its child components, recursively. + When the look-and-feel is changed for a component, this method, repaint(), and + colourChanged() are called on the original component and all its children recursively. It can also be triggered manually by the sendLookAndFeelChange() method, in case an application uses a LookAndFeel class that might have changed internally. @@ -1184,10 +1184,8 @@ public: */ virtual void lookAndFeelChanged(); - /** Calls the lookAndFeelChanged() method in this component and all its children. - - This will recurse through the children and their children, calling lookAndFeelChanged() - on them all. + /** Calls the methods repaint(), lookAndFeelChanged(), and colourChanged() in this + component and all its children recursively. @see lookAndFeelChanged */ @@ -2257,8 +2255,11 @@ public: */ void copyAllExplicitColoursTo (Component& target) const; - /** This method is called when a colour is changed by the setColour() method. - @see setColour, findColour + /** This method is called when a colour is changed by the setColour() method, + or when the look-and-feel is changed by the setLookAndFeel() or + sendLookAndFeelChanged() methods. + + @see setColour, findColour, setLookAndFeel, sendLookAndFeelChanged */ virtual void colourChanged();