diff --git a/include/app/ModuleWidget.hpp b/include/app/ModuleWidget.hpp index 11051a7a..4b60e5ae 100644 --- a/include/app/ModuleWidget.hpp +++ b/include/app/ModuleWidget.hpp @@ -51,7 +51,7 @@ struct ModuleWidget : widget::OpaqueWidget { */ void setPanel(widget::Widget* panel); /** Use `setPanel(createPanel(svg))` instead. */ - DEPRECATED void setPanel(std::shared_ptr svg); + void setPanel(std::shared_ptr svg); /** Convenience functions for adding special widgets (calls addChild()) */ void addParam(ParamWidget* param); diff --git a/include/app/SvgPanel.hpp b/include/app/SvgPanel.hpp index 80cfe820..0436ac61 100644 --- a/include/app/SvgPanel.hpp +++ b/include/app/SvgPanel.hpp @@ -20,11 +20,10 @@ struct SvgPanel : widget::Widget { widget::SvgWidget* sw; PanelBorder* panelBorder; std::shared_ptr svg; - std::shared_ptr darkSvg; SvgPanel(); void step() override; - void setBackground(std::shared_ptr svg, std::shared_ptr darkSvg = NULL); + void setBackground(std::shared_ptr svg); }; diff --git a/include/helpers.hpp b/include/helpers.hpp index aeddcd7b..b82f0c12 100644 --- a/include/helpers.hpp +++ b/include/helpers.hpp @@ -56,13 +56,10 @@ TWidget* createWidgetCentered(math::Vec pos) { return o; } -inline app::SvgPanel* createPanel(std::string svgPath, std::string darkSvgPath = "") { +inline app::SvgPanel* createPanel(std::string svgPath) { app::SvgPanel* panel = new app::SvgPanel; std::shared_ptr svg = APP->window->loadSvg(svgPath); - std::shared_ptr darkSvg; - if (darkSvgPath != "") - darkSvg = APP->window->loadSvg(darkSvgPath); - panel->setBackground(svg, darkSvg); + panel->setBackground(svg); return panel; } diff --git a/include/settings.hpp b/include/settings.hpp index 1ef7bcba..28dc2abc 100644 --- a/include/settings.hpp +++ b/include/settings.hpp @@ -42,7 +42,6 @@ extern int threadCount; extern bool paramTooltip; extern bool cpuMeter; extern bool lockModules; -extern bool darkMode; extern int frameSwapInterval; extern float autosavePeriod; extern bool skipLoadOnLaunch; @@ -57,9 +56,6 @@ void fromJson(json_t* rootJ); void save(const std::string& path); void load(const std::string& path); -// Getters, for ensuring API/ABI compatibility for plugins -bool isDarkMode(); - } // namespace settings } // namespace rack diff --git a/src/app/MenuBar.cpp b/src/app/MenuBar.cpp index e0598081..c4d323b4 100644 --- a/src/app/MenuBar.cpp +++ b/src/app/MenuBar.cpp @@ -384,12 +384,6 @@ struct LockModulesItem : ui::MenuItem { } }; -struct DarkModeItem : ui::MenuItem { - void onAction(const event::Action& e) override { - settings::darkMode ^= true; - } -}; - struct FrameRateValueItem : ui::MenuItem { int frameSwapInterval; void onAction(const event::Action& e) override { @@ -458,11 +452,6 @@ struct ViewButton : MenuButton { cableTensionSlider->box.size.x = 200.0; menu->addChild(cableTensionSlider); - DarkModeItem* darkModeItem = new DarkModeItem; - darkModeItem->text = "Dark mode"; - darkModeItem->rightText = CHECKMARK(settings::darkMode); - menu->addChild(darkModeItem); - FrameRateItem* frameRateItem = new FrameRateItem; frameRateItem->text = "Frame rate"; frameRateItem->rightText = RIGHT_ARROW; diff --git a/src/app/SvgPanel.cpp b/src/app/SvgPanel.cpp index 4a8e229e..ef27b16c 100644 --- a/src/app/SvgPanel.cpp +++ b/src/app/SvgPanel.cpp @@ -34,20 +34,11 @@ void SvgPanel::step() { fb->oversample = 2.0; } - std::shared_ptr svg = this->svg; - if (settings::isDarkMode() && this->darkSvg) - svg = this->darkSvg; - if (sw->svg != svg) { - sw->setSvg(svg); - fb->dirty = true; - } - Widget::step(); } -void SvgPanel::setBackground(std::shared_ptr svg, std::shared_ptr darkSvg) { +void SvgPanel::setBackground(std::shared_ptr svg) { this->svg = svg; - this->darkSvg = darkSvg; sw->setSvg(svg); fb->box.size = sw->box.size.div(RACK_GRID_SIZE).round().mult(RACK_GRID_SIZE); diff --git a/src/settings.cpp b/src/settings.cpp index 9c2617b0..55345494 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -30,7 +30,6 @@ int threadCount = 1; bool paramTooltip = true; bool cpuMeter = false; bool lockModules = false; -bool darkMode = false; #if defined ARCH_MAC // Most Mac GPUs can't handle rendering the screen every frame, so use ~30 Hz by default. int frameSwapInterval = 2; @@ -87,8 +86,6 @@ json_t* toJson() { json_object_set_new(rootJ, "lockModules", json_boolean(lockModules)); - json_object_set_new(rootJ, "darkMode", json_boolean(darkMode)); - json_object_set_new(rootJ, "frameSwapInterval", json_integer(frameSwapInterval)); json_object_set_new(rootJ, "autosavePeriod", json_real(autosavePeriod)); @@ -191,10 +188,6 @@ void fromJson(json_t* rootJ) { if (lockModulesJ) lockModules = json_boolean_value(lockModulesJ); - json_t* darkModeJ = json_object_get(rootJ, "darkMode"); - if (darkModeJ) - darkMode = json_boolean_value(darkModeJ); - json_t* frameSwapIntervalJ = json_object_get(rootJ, "frameSwapInterval"); if (frameSwapIntervalJ) frameSwapInterval = json_integer_value(frameSwapIntervalJ); @@ -286,10 +279,5 @@ void load(const std::string& path) { } -bool isDarkMode() { - return darkMode; -} - - } // namespace settings } // namespace rack