mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Widgets: call repaint() in colourChanged() callbacks
This commit is contained in:
parent
5fb78e30ac
commit
c7689793f2
4 changed files with 13 additions and 10 deletions
|
|
@ -2234,6 +2234,8 @@ public:
|
|||
method, which your component can override if it needs to do something when
|
||||
colours are altered.
|
||||
|
||||
Note repaint() is not automatically called when a colour is changed.
|
||||
|
||||
For more details about colour IDs, see the comments for findColour().
|
||||
|
||||
@see findColour, isColourSpecified, colourChanged, LookAndFeel::findColour, LookAndFeel::setColour
|
||||
|
|
|
|||
|
|
@ -392,7 +392,14 @@ void ComboBox::enablementChanged()
|
|||
|
||||
void ComboBox::colourChanged()
|
||||
{
|
||||
lookAndFeelChanged();
|
||||
label->setColour (Label::backgroundColourId, Colours::transparentBlack);
|
||||
label->setColour (Label::textColourId, findColour (ComboBox::textColourId));
|
||||
|
||||
label->setColour (TextEditor::textColourId, findColour (ComboBox::textColourId));
|
||||
label->setColour (TextEditor::backgroundColourId, Colours::transparentBlack);
|
||||
label->setColour (TextEditor::highlightColourId, findColour (TextEditor::highlightColourId));
|
||||
label->setColour (TextEditor::outlineColourId, Colours::transparentBlack);
|
||||
repaint();
|
||||
}
|
||||
|
||||
void ComboBox::parentHierarchyChanged()
|
||||
|
|
@ -431,14 +438,7 @@ void ComboBox::lookAndFeelChanged()
|
|||
label->addMouseListener (this, false);
|
||||
label->setAccessible (labelEditableState == labelIsEditable);
|
||||
|
||||
label->setColour (Label::backgroundColourId, Colours::transparentBlack);
|
||||
label->setColour (Label::textColourId, findColour (ComboBox::textColourId));
|
||||
|
||||
label->setColour (TextEditor::textColourId, findColour (ComboBox::textColourId));
|
||||
label->setColour (TextEditor::backgroundColourId, Colours::transparentBlack);
|
||||
label->setColour (TextEditor::highlightColourId, findColour (TextEditor::highlightColourId));
|
||||
label->setColour (TextEditor::outlineColourId, Colours::transparentBlack);
|
||||
|
||||
colourChanged();
|
||||
resized();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ void ProgressBar::lookAndFeelChanged()
|
|||
void ProgressBar::colourChanged()
|
||||
{
|
||||
lookAndFeelChanged();
|
||||
repaint();
|
||||
}
|
||||
|
||||
void ProgressBar::paint (Graphics& g)
|
||||
|
|
|
|||
|
|
@ -1573,7 +1573,7 @@ void Slider::setPopupDisplayEnabled (bool showOnDrag, bool showOnHover, Componen
|
|||
Component* Slider::getCurrentPopupDisplay() const noexcept { return pimpl->popupDisplay.get(); }
|
||||
|
||||
//==============================================================================
|
||||
void Slider::colourChanged() { lookAndFeelChanged(); }
|
||||
void Slider::colourChanged() { repaint(); }
|
||||
void Slider::lookAndFeelChanged() { pimpl->lookAndFeelChanged (getLookAndFeel()); }
|
||||
void Slider::enablementChanged() { repaint(); pimpl->updateTextBoxEnablement(); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue