mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Add a base clang-tidy configuration
This commit is contained in:
parent
0dfaa98e86
commit
9b041f3d74
73 changed files with 484 additions and 279 deletions
|
|
@ -67,7 +67,7 @@ struct CodeContent : public Component
|
|||
codeEditor.setReadOnly (true);
|
||||
codeEditor.setScrollbarThickness (8);
|
||||
|
||||
lookAndFeelChanged();
|
||||
updateLookAndFeel();
|
||||
}
|
||||
|
||||
void resized() override
|
||||
|
|
@ -83,9 +83,9 @@ struct CodeContent : public Component
|
|||
"*******************************************************************************/\n");
|
||||
}
|
||||
|
||||
void lookAndFeelChanged() override
|
||||
void updateLookAndFeel()
|
||||
{
|
||||
auto* v4 = dynamic_cast <LookAndFeel_V4*> (&Desktop::getInstance().getDefaultLookAndFeel());
|
||||
auto* v4 = dynamic_cast<LookAndFeel_V4*> (&Desktop::getInstance().getDefaultLookAndFeel());
|
||||
|
||||
if (v4 != nullptr && (v4->getCurrentColourScheme() != LookAndFeel_V4::getLightColourScheme()))
|
||||
codeEditor.setColourScheme (getDarkColourScheme());
|
||||
|
|
@ -93,6 +93,11 @@ struct CodeContent : public Component
|
|||
codeEditor.setColourScheme (getLightColourScheme());
|
||||
}
|
||||
|
||||
void lookAndFeelChanged() override
|
||||
{
|
||||
updateLookAndFeel();
|
||||
}
|
||||
|
||||
CodeDocument document;
|
||||
CPlusPlusCodeTokeniser cppTokensier;
|
||||
CodeEditorComponent codeEditor { document, &cppTokensier };
|
||||
|
|
@ -115,7 +120,7 @@ DemoContentComponent::DemoContentComponent (Component& mainComponent, std::funct
|
|||
addTab ("Settings", Colours::transparentBlack, new SettingsContent (dynamic_cast<MainComponent&> (mainComponent)), true);
|
||||
|
||||
setTabBarDepth (40);
|
||||
lookAndFeelChanged();
|
||||
updateLookAndFeel();
|
||||
}
|
||||
|
||||
DemoContentComponent::~DemoContentComponent()
|
||||
|
|
@ -182,7 +187,7 @@ void DemoContentComponent::clearCurrentDemo()
|
|||
demoChangedCallback (false);
|
||||
}
|
||||
|
||||
void DemoContentComponent::lookAndFeelChanged()
|
||||
void DemoContentComponent::updateLookAndFeel()
|
||||
{
|
||||
auto backgroundColour = findColour (ResizableWindow::backgroundColourId);
|
||||
|
||||
|
|
@ -190,6 +195,11 @@ void DemoContentComponent::lookAndFeelChanged()
|
|||
setTabBackgroundColour (i, backgroundColour);
|
||||
}
|
||||
|
||||
void DemoContentComponent::lookAndFeelChanged()
|
||||
{
|
||||
updateLookAndFeel();
|
||||
}
|
||||
|
||||
String DemoContentComponent::trimPIP (const String& fileContents)
|
||||
{
|
||||
auto lines = StringArray::fromLines (fileContents);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ private:
|
|||
int tabBarIndent = 0;
|
||||
|
||||
//==============================================================================
|
||||
void updateLookAndFeel();
|
||||
void lookAndFeelChanged() override;
|
||||
|
||||
String trimPIP (const String& fileContents);
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ struct SidePanelHeader : public Component
|
|||
addAndMakeVisible (settingsButton);
|
||||
settingsButton.onClick = [this] { owner.settingsButtonClicked(); };
|
||||
|
||||
lookAndFeelChanged();
|
||||
updateLookAndFeel();
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
|
|
@ -102,7 +102,7 @@ struct SidePanelHeader : public Component
|
|||
titleLabel.setBounds (bounds);
|
||||
}
|
||||
|
||||
void lookAndFeelChanged() override
|
||||
void updateLookAndFeel()
|
||||
{
|
||||
auto& sidePanel = owner.getSidePanel();
|
||||
auto& lf = sidePanel.getLookAndFeel();
|
||||
|
|
@ -117,6 +117,12 @@ struct SidePanelHeader : public Component
|
|||
|
||||
homeButton.setColours (normal, over, down);
|
||||
settingsButton.setColours (normal, over, down);
|
||||
|
||||
}
|
||||
|
||||
void lookAndFeelChanged() override
|
||||
{
|
||||
updateLookAndFeel();
|
||||
}
|
||||
|
||||
MainComponent& owner;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue