Dark mode for ESeries and JW-Modules
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
cc610760d6
commit
9bce61f3b8
1 changed files with 65 additions and 1 deletions
|
@ -191,6 +191,7 @@ static const struct {
|
||||||
const int shapeNumberToIgnore;
|
const int shapeNumberToIgnore;
|
||||||
} svgFilesToInvert[] = {
|
} svgFilesToInvert[] = {
|
||||||
{ "/AnimatedCircuits/FoldingLight.svg", {}, -1 },
|
{ "/AnimatedCircuits/FoldingLight.svg", {}, -1 },
|
||||||
|
{ "/AnimatedCircuits/Knob_Black_Light_21.svg", {}, -1 },
|
||||||
{ "/AudibleInstruments/Blinds.svg", {}, -1 },
|
{ "/AudibleInstruments/Blinds.svg", {}, -1 },
|
||||||
{ "/AudibleInstruments/Braids.svg", {}, -1 },
|
{ "/AudibleInstruments/Braids.svg", {}, -1 },
|
||||||
{ "/AudibleInstruments/Branches.svg", {}, -1 },
|
{ "/AudibleInstruments/Branches.svg", {}, -1 },
|
||||||
|
@ -291,10 +292,33 @@ static const struct {
|
||||||
{ "/DrumKit/Sequencer.svg", {}, -1 },
|
{ "/DrumKit/Sequencer.svg", {}, -1 },
|
||||||
{ "/DrumKit/Snare.svg", {}, -1 },
|
{ "/DrumKit/Snare.svg", {}, -1 },
|
||||||
{ "/DrumKit/Tomi.svg", {}, -1 },
|
{ "/DrumKit/Tomi.svg", {}, -1 },
|
||||||
|
{ "/ESeries/E340.svg", {}, -1 },
|
||||||
{ "/Fundamental/SequentialSwitch1.svg", {}, -1 },
|
{ "/Fundamental/SequentialSwitch1.svg", {}, -1 },
|
||||||
{ "/Fundamental/SequentialSwitch2.svg", {}, -1 },
|
{ "/Fundamental/SequentialSwitch2.svg", {}, -1 },
|
||||||
{ "/Fundamental/VCA-1.svg", {}, -1 },
|
{ "/Fundamental/VCA-1.svg", {}, -1 },
|
||||||
{ "/Fundamental/VCA.svg", {}, -1 },
|
{ "/Fundamental/VCA.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/Add5.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/BlankPanel1hp.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/BlankPanelLarge.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/BlankPanelMedium.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/BlankPanelSmall.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/BouncyBalls.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/D1v1de.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/DivSeq.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/EightSeq.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/GridSeq.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/MinMax.svg", {"path38411"}, -1 },
|
||||||
|
{ "/JW-Modules/NoteSeq.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/NoteSeq16.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/NoteSeqFu.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/OnePattern.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/Patterns.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/Pres1t.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/PT.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/Str1ker.svg", {"rect2094","rect995","rect169"}, -1 },
|
||||||
|
{ "/JW-Modules/Trigs.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/WavHeadPanel.svg", {}, -1 },
|
||||||
|
{ "/JW-Modules/XYPad.svg", {}, -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void removeShape(NSVGimage* const handle, const char* const id)
|
static void removeShape(NSVGimage* const handle, const char* const id)
|
||||||
|
@ -321,10 +345,12 @@ static bool invertPaint(NSVGpaint& paint, const char* const svgFileToInvert = nu
|
||||||
if (paint.type == NSVG_PAINT_LINEAR_GRADIENT && svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/DrumKit/", 9) == 0)
|
if (paint.type == NSVG_PAINT_LINEAR_GRADIENT && svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/DrumKit/", 9) == 0)
|
||||||
{
|
{
|
||||||
paint.type = NSVG_PAINT_COLOR;
|
paint.type = NSVG_PAINT_COLOR;
|
||||||
paint.color = 0xff000000;
|
paint.color = 0xff191919;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (paint.type == NSVG_PAINT_NONE)
|
||||||
|
return true;
|
||||||
if (paint.type != NSVG_PAINT_COLOR)
|
if (paint.type != NSVG_PAINT_COLOR)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -335,6 +361,44 @@ static bool invertPaint(NSVGpaint& paint, const char* const svgFileToInvert = nu
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Special case for JW-Modules colors
|
||||||
|
if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/JW-Modules/", 12) == 0)
|
||||||
|
{
|
||||||
|
switch (paint.color)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
case 0x320997ff:
|
||||||
|
case 0x32099aff:
|
||||||
|
case 0x3209f1ff:
|
||||||
|
case 0x3209f3ff:
|
||||||
|
case 0x32fc1a8f:
|
||||||
|
case 0x32fc1a90:
|
||||||
|
case 0x32fc9418:
|
||||||
|
case 0x32fc9619:
|
||||||
|
case 0xc7fc9619:
|
||||||
|
case 0xff050505:
|
||||||
|
case 0xffead7be:
|
||||||
|
case 0xfff7a540:
|
||||||
|
case 0xfffa9c2a:
|
||||||
|
case 0xfffc9619:
|
||||||
|
case 0xfffcb654:
|
||||||
|
case 0xfffd9c17:
|
||||||
|
case 0xffffffff:
|
||||||
|
return false;
|
||||||
|
// make more transparent
|
||||||
|
case 0xffbad6eb:
|
||||||
|
case 0xffbae8eb:
|
||||||
|
case 0xffeabed5:
|
||||||
|
case 0xffead6bd:
|
||||||
|
paint.color = 0x32000000 | (paint.color & 0xffffff);
|
||||||
|
return true;
|
||||||
|
// make it more white
|
||||||
|
case 0xffa0a0a0:
|
||||||
|
paint.color = 0xffc0c0c0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (paint.color)
|
switch (paint.color)
|
||||||
{
|
{
|
||||||
// scopes or other special things (do nothing)
|
// scopes or other special things (do nothing)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue