Skip to content

Commit

Permalink
Stop using cardinal-specific settings::darkMode
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Mar 9, 2024
1 parent 68b1a6c commit 32e7f7c
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 40 deletions.
2 changes: 1 addition & 1 deletion deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ SURGE_ENV = env \
SURGE_LIB = $(SURGE_DEP_PATH)/src/common/libsurge-common.a

$(SURGE_LIB): $(SURGE_DEP_PATH)/Makefile
$(DEP_MAKE) -C $(SURGE_DEP_PATH) surge-common
+$(DEP_MAKE) -C $(SURGE_DEP_PATH) surge-common

$(SURGE_DEP_PATH)/Makefile: $(SURGE_SRC_PATH)/CMakeLists.txt
mkdir -p $(SURGE_DEP_PATH)
Expand Down
2 changes: 1 addition & 1 deletion dpf
Submodule dpf updated 1 files
+3 −2 Makefile.plugins.mk
18 changes: 2 additions & 16 deletions include/settings.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2023 Filipe Coelho <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the LICENSE file.
* Copyright (C) 2021-2024 Filipe Coelho <[email protected]>
* SPDX-License-Identifier: GPL-3.0-or-later
*/

#pragma once
Expand All @@ -24,8 +13,5 @@ namespace settings {

extern int rateLimit;

// TODO remove after updating all plugins
extern bool darkMode;

} // namespace settings
} // namespace rack
2 changes: 1 addition & 1 deletion plugins/AnimatedCircuits
2 changes: 1 addition & 1 deletion plugins/RebelTech
Submodule RebelTech updated 1 files
+1 −1 src/plugin.hpp
2 changes: 1 addition & 1 deletion plugins/stoermelder-packone
20 changes: 5 additions & 15 deletions src/CardinalCommon.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2023 Filipe Coelho <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the LICENSE file.
* Copyright (C) 2021-2024 Filipe Coelho <[email protected]>
* SPDX-License-Identifier: GPL-3.0-or-later
*/

#pragma once
Expand Down Expand Up @@ -87,8 +76,9 @@ void openBrowser(const std::string& url);
# define CARDINAL_INIT_OSC_THREAD
#endif

typedef void* lo_server;
typedef void* lo_server_thread;
#ifdef HAVE_LIBLO
# include <lo/lo_types.h>
#endif

START_NAMESPACE_DISTRHO

Expand Down
2 changes: 0 additions & 2 deletions src/custom/dep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace settings {
int rateLimit = 0;
extern bool preferDarkPanels;
extern std::string uiTheme;
bool darkMode; // TODO remove after updating all plugins
}
namespace ui {
void refreshTheme();
Expand Down Expand Up @@ -1451,7 +1450,6 @@ namespace rack {
void switchDarkMode(const bool darkMode)
{
#ifndef HEADLESS
settings::darkMode = darkMode; // TODO remove after updating all plugins
settings::preferDarkPanels = darkMode;
settings::uiTheme = darkMode ? "dark" : "light";
ui::refreshTheme();
Expand Down

0 comments on commit 32e7f7c

Please sign in to comment.