A few more light mode things

This commit is contained in:
falkTX 2022-07-19 20:33:34 +01:00
parent 187b1c72dd
commit 8cec74e966
10 changed files with 80 additions and 15 deletions

View file

@ -617,7 +617,7 @@ static void nsvg__duplicatePaint(NSVGpaint& dst, NSVGpaint& src)
if (dst.type == NSVG_PAINT_LINEAR_GRADIENT || dst.type == NSVG_PAINT_RADIAL_GRADIENT)
{
dst.gradient = static_cast<NSVGgradient*>(malloc(sizeof(NSVGgradient)));
std::memcpy(dst.gradient, src.gradient, sizeof(NSVGgradient));
std::memcpy(dst.gradient, src.gradient, sizeof(NSVGgradient));
}
}

View file

@ -68,6 +68,10 @@ namespace asset {
std::string patchesPath();
}
namespace plugin {
void updateStaticPluginsDarkMode();
}
namespace app {
namespace menuBar {
@ -522,6 +526,7 @@ struct ViewButton : MenuButton {
darkModeText = CHECKMARK_STRING;
menu->addChild(createMenuItem("Dark Mode", darkModeText, []() {
switchDarkMode(!settings::darkMode);
plugin::updateStaticPluginsDarkMode();
setAllFramebufferWidgetsDirty(APP->scene);
}));