Stop using cardinal-specific settings::darkMode

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2024-03-09 13:37:51 +01:00
parent 68b1a6c4c7
commit 32e7f7c0eb
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
10 changed files with 14 additions and 40 deletions

View file

@ -1,18 +1,7 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
*
* 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 <falktx@falktx.com>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#pragma once
@ -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

View file

@ -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();
@ -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();