From 46b510e898a0a716905fbc2d15d077e4688f51e7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 15 Sep 2022 17:54:16 +0100 Subject: [PATCH] Light mode in even more modules Signed-off-by: falkTX --- plugins/ArableInstruments | 2 +- plugins/MindMeldModular | 2 +- plugins/ValleyAudio | 2 +- src/custom/dep.cpp | 22 ++++++++++++++++++---- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/plugins/ArableInstruments b/plugins/ArableInstruments index 6f09e9d..f93a357 160000 --- a/plugins/ArableInstruments +++ b/plugins/ArableInstruments @@ -1 +1 @@ -Subproject commit 6f09e9d3e6a1c9b862ca2421227d33fdc4834e2d +Subproject commit f93a357f1643b831d60e28a3ac51575007aa4c5f diff --git a/plugins/MindMeldModular b/plugins/MindMeldModular index f526208..8e413a4 160000 --- a/plugins/MindMeldModular +++ b/plugins/MindMeldModular @@ -1 +1 @@ -Subproject commit f526208d9b54f9fc8950919ed3f9d9793c6e54e2 +Subproject commit 8e413a445c1c307f356ee96633b7f6f2b4c4749e diff --git a/plugins/ValleyAudio b/plugins/ValleyAudio index 9745a4c..b2ed19a 160000 --- a/plugins/ValleyAudio +++ b/plugins/ValleyAudio @@ -1 +1 @@ -Subproject commit 9745a4c63747a2225a31da69b085e6185b4c8407 +Subproject commit b2ed19ad46e91c650d0ba3e18eae9a1bbecb1f3c diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 24ec19b..0fe760e 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -119,8 +119,6 @@ static const struct { { kModeAlgoritmarte, "/Algoritmarte/res/Planetz.svg", {}, -1 }, { kModeAlgoritmarte, "/Algoritmarte/res/Zefiro.svg", {}, -1 }, // Custom, runtime dark mode used with permission - { kModeArableInstruments, "/ArableInstruments/res/Joni.svg", {}, -1 }, - // Custom, runtime dark mode used with permission { kModeAudibleInstruments, "/AudibleInstruments/res/Blinds.svg", {}, -1 }, { kModeAudibleInstruments, "/AudibleInstruments/res/Braids.svg", {}, -1 }, { kModeAudibleInstruments, "/AudibleInstruments/res/Branches.svg", {}, -1 }, @@ -336,8 +334,6 @@ static const struct { { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - SEGUE.svg", {}, -1 }, { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - STATUES.svg", {}, -1 }, { kModeNonlinearcircuits, "/nonlinearcircuits/res/squid-axon-papernoise-panel2.svg", {}, -1 }, - // Custom, runtime dark mode used with permission - { kModeParableInstruments, "/ParableInstruments/res/Neil.svg", {}, -1 }, // GPL-3.0-or-later { kModePathSet, "/PathSet/res/AstroVibe.svg", {}, -1 }, { kModePathSet, "/PathSet/res/GlassPane.svg", {}, -1 }, @@ -373,6 +369,7 @@ static const struct { }; enum LightMode { + kMode8Mode, kModeAutinn, kModeBefaco, kModeCardinal, @@ -396,6 +393,8 @@ static const struct { const char* shapeIdsToIgnore[5]; const int shapeNumberToIgnore; } svgFilesToInvertForLightMode[] = { + // BSD + { kMode8Mode, "/8Mode/res/SNsoft_Panel.svg", {}, -1 }, // GPLv3+ { kModeAutinn, "/Autinn/res/AmpModule.svg", {}, -1 }, { kModeAutinn, "/Autinn/res/BassModule.svg", {}, -1 }, @@ -904,6 +903,21 @@ bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGp switch (mode) { + case kMode8Mode: + switch (paint.color) + { + case 0xff000000: + if (std::strcmp(shape->id, "rect1211") == 0) + break; + return false; + case 0xff1a1a1a: + if (std::strcmp(shape->id, "rect1523") != 0) + break; + return false; + default: + return false; + } + break; case kModeAutinn: switch (paint.color) {