Browse Source

Light mode in even more modules

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.09
falkTX 2 years ago
parent
commit
46b510e898
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 21 additions and 7 deletions
  1. +1
    -1
      plugins/ArableInstruments
  2. +1
    -1
      plugins/MindMeldModular
  3. +1
    -1
      plugins/ValleyAudio
  4. +18
    -4
      src/custom/dep.cpp

+ 1
- 1
plugins/ArableInstruments

@@ -1 +1 @@
Subproject commit 6f09e9d3e6a1c9b862ca2421227d33fdc4834e2d
Subproject commit f93a357f1643b831d60e28a3ac51575007aa4c5f

+ 1
- 1
plugins/MindMeldModular

@@ -1 +1 @@
Subproject commit f526208d9b54f9fc8950919ed3f9d9793c6e54e2
Subproject commit 8e413a445c1c307f356ee96633b7f6f2b4c4749e

+ 1
- 1
plugins/ValleyAudio

@@ -1 +1 @@
Subproject commit 9745a4c63747a2225a31da69b085e6185b4c8407
Subproject commit b2ed19ad46e91c650d0ba3e18eae9a1bbecb1f3c

+ 18
- 4
src/custom/dep.cpp View File

@@ -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)
{


Loading…
Cancel
Save