Update and adapt to Rack 2.3
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
03055c2563
commit
1262f318da
41 changed files with 901 additions and 727 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
|
||||
* 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
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
/**
|
||||
* This file is an edited version of VCVRack's Window.cpp
|
||||
* Copyright (C) 2016-2021 VCV.
|
||||
* Copyright (C) 2016-2023 VCV.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
|
|
@ -108,8 +108,8 @@ void Window::step() {
|
|||
}
|
||||
|
||||
|
||||
void Window::activateContext() {
|
||||
}
|
||||
// void Window::activateContext() {
|
||||
// }
|
||||
|
||||
|
||||
void Window::screenshot(const std::string&) {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,10 @@ void updateForcingBlackSilverScrewMode(std::string slug) {
|
|||
namespace settings {
|
||||
bool darkMode = true;
|
||||
int rateLimit = 0;
|
||||
extern std::string uiTheme;
|
||||
}
|
||||
namespace ui {
|
||||
void refreshTheme();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1468,13 +1472,17 @@ void nsvgDeleteCardinal(NSVGimage* const handle)
|
|||
nsvgDelete(handle);
|
||||
}
|
||||
|
||||
namespace rack {
|
||||
|
||||
void switchDarkMode(const bool darkMode)
|
||||
{
|
||||
#ifndef HEADLESS
|
||||
if (rack::settings::darkMode == darkMode)
|
||||
if (settings::darkMode == darkMode)
|
||||
return;
|
||||
|
||||
rack::settings::darkMode = darkMode;
|
||||
settings::darkMode = darkMode;
|
||||
settings::uiTheme = darkMode ? "dark" : "light";
|
||||
ui::refreshTheme();
|
||||
|
||||
for (ExtendedNSVGimage& ext : loadedDarkSVGs)
|
||||
{
|
||||
|
|
@ -1494,7 +1502,6 @@ void switchDarkMode(const bool darkMode)
|
|||
#endif
|
||||
}
|
||||
|
||||
namespace rack {
|
||||
namespace asset {
|
||||
|
||||
void destroy() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue