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:
parent
c08375a5ab
commit
3b65c5c37d
2 changed files with 30 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue