1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer AppearanceSettingsTab: added missing resized() function; moved declaration into header and added explanatory comment.

This commit is contained in:
Timur Doumler 2016-04-13 11:41:43 +01:00
parent c08375a5ab
commit 3b65c5c37d
2 changed files with 30 additions and 17 deletions

View file

@ -27,21 +27,6 @@
#include "../Utility/jucer_FloatingToolWindow.h"
#include "../Utility/jucer_ColourPropertyComponent.h"
//==============================================================================
class AppearanceSettingsTab : public GlobalPreferencesTab,
public Component
{
public:
AppearanceSettingsTab();
Component* getContent() override;
void changeContent (Component* newContent);
String getName() const noexcept override;
ScopedPointer<Component> content;
};
//==============================================================================
PathSettingsTab::PathSettingsTab (DependencyPathOS os)
{
@ -365,8 +350,8 @@ Component* AppearanceSettingsTab::getContent()
void AppearanceSettingsTab::changeContent (Component* newContent)
{
content = newContent;
addAndMakeVisible(content);
content->setBoundsInset(BorderSize<int>());
addAndMakeVisible (content);
content->setBounds (getLocalBounds());
}
String AppearanceSettingsTab::getName() const noexcept
@ -374,6 +359,11 @@ String AppearanceSettingsTab::getName() const noexcept
return "Code Editor";
}
void AppearanceSettingsTab::resized()
{
content->setBounds (getLocalBounds());
}
//==============================================================================
GlobalPreferencesComponent::GlobalPreferencesComponent()
: TabbedComponent (TabbedButtonBar::TabsAtTop)

View file

@ -74,6 +74,29 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PathSettingsTab)
};
//==============================================================================
/** This component implements the "Code Editor" tabl in the global preferences window,
which sets font sizes and colours for the Projucer's code editor.
The content is either an EditorPanel (the actual settings tab) or a FontScanPanel
(shown if the tab is scanning for available fonts before showing the EditorPanel).
*/
class AppearanceSettingsTab : public GlobalPreferencesTab,
public Component
{
public:
AppearanceSettingsTab();
Component* getContent() override;
void changeContent (Component* newContent);
String getName() const noexcept override;
void resized() override;
private:
ScopedPointer<Component> content;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AppearanceSettingsTab)
};
//==============================================================================
class GlobalPreferencesComponent : public TabbedComponent