mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
GUI: Ensure components refresh correctly when their look and feel changes
This commit is contained in:
parent
68e0e0e329
commit
39b5c22a29
10 changed files with 48 additions and 14 deletions
|
|
@ -341,7 +341,7 @@ CodeEditorComponent::CodeEditorComponent (CodeDocument& doc, CodeTokeniser* cons
|
|||
setMouseCursor (MouseCursor::IBeamCursor);
|
||||
setWantsKeyboardFocus (true);
|
||||
|
||||
caret.reset (getLookAndFeel().createCaretComponent (this));
|
||||
lookAndFeelChanged();
|
||||
addAndMakeVisible (caret.get());
|
||||
|
||||
addAndMakeVisible (verticalScrollBar);
|
||||
|
|
@ -1308,6 +1308,11 @@ bool CodeEditorComponent::perform (const InvocationInfo& info)
|
|||
return performCommand (info.commandID);
|
||||
}
|
||||
|
||||
void CodeEditorComponent::lookAndFeelChanged()
|
||||
{
|
||||
caret.reset (getLookAndFeel().createCaretComponent (this));
|
||||
}
|
||||
|
||||
bool CodeEditorComponent::performCommand (const CommandID commandID)
|
||||
{
|
||||
switch (commandID)
|
||||
|
|
|
|||
|
|
@ -371,6 +371,8 @@ public:
|
|||
void getCommandInfo (CommandID, ApplicationCommandInfo&) override;
|
||||
/** @internal */
|
||||
bool perform (const InvocationInfo&) override;
|
||||
/** @internal */
|
||||
void lookAndFeelChanged() override;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue