diff --git a/source/frontend/patchcanvas/theme.cpp b/source/frontend/patchcanvas/theme.cpp index bfb0be8ff..2c6519bf0 100644 --- a/source/frontend/patchcanvas/theme.cpp +++ b/source/frontend/patchcanvas/theme.cpp @@ -624,35 +624,9 @@ struct Theme::PrivateData { Theme::Theme(const Theme::List idx) : self(new PrivateData(idx)) {} -//--------------------------------------------------------------------------------------------------------------------- - -Theme::List getDefaultTheme() -{ - return Theme::THEME_MODERN_DARK; -} - -const char* getThemeName(const Theme::List idx) -{ - switch (idx) - { - case Theme::THEME_MODERN_DARK: - return "Modern Dark"; - case Theme::THEME_MODERN_DARK_TINY: - return "Modern Dark (Tiny)"; - case Theme::THEME_MODERN_LIGHT: - return "Modern Light"; - case Theme::THEME_CLASSIC_DARK: - return "Classic Dark"; - case Theme::THEME_OOSTUDIO: - return "OpenOctave Studio"; - default: - return ""; - } -} - -const char* getDefaultThemeName() +Theme::~Theme() { - return "Modern Dark"; + delete self; } //--------------------------------------------------------------------------------------------------------------------- diff --git a/source/frontend/patchcanvas/theme.hpp b/source/frontend/patchcanvas/theme.hpp index deee63051..e53aff390 100644 --- a/source/frontend/patchcanvas/theme.hpp +++ b/source/frontend/patchcanvas/theme.hpp @@ -62,9 +62,37 @@ private: //--------------------------------------------------------------------------------------------------------------------- -Theme::List getDefaultTheme(); -const char* getThemeName(Theme::List idx); -const char* getDefaultThemeName(); +static inline +Theme::List getDefaultTheme() +{ + return Theme::THEME_MODERN_DARK; +} + +static inline +const char* getDefaultThemeName() +{ + return "Modern Dark"; +} + +static inline +const char* getThemeName(const Theme::List idx) +{ + switch (idx) + { + case Theme::THEME_MODERN_DARK: + return "Modern Dark"; + case Theme::THEME_MODERN_DARK_TINY: + return "Modern Dark (Tiny)"; + case Theme::THEME_MODERN_LIGHT: + return "Modern Light"; + case Theme::THEME_CLASSIC_DARK: + return "Classic Dark"; + case Theme::THEME_OOSTUDIO: + return "OpenOctave Studio"; + default: + return ""; + } +} //---------------------------------------------------------------------------------------------------------------------