diff --git a/lib/libimhex/source/api/theme_manager.cpp b/lib/libimhex/source/api/theme_manager.cpp index d7588459c..1410666e9 100644 --- a/lib/libimhex/source/api/theme_manager.cpp +++ b/lib/libimhex/source/api/theme_manager.cpp @@ -31,6 +31,9 @@ namespace hex::api { } std::optional ThemeManager::parseColorString(const std::string &colorString) { + if (colorString == "auto") + return ImVec4(0, 0, 0, -1); + if (colorString.length() != 9 || colorString[0] != '#') return std::nullopt; @@ -48,6 +51,9 @@ namespace hex::api { return std::nullopt; } + if (color == 0x00000000) + return ImVec4(0, 0, 0, -1); + return ImColor(hex::changeEndianess(color, std::endian::big)); } diff --git a/plugins/builtin/romfs/themes/classic.json b/plugins/builtin/romfs/themes/classic.json index 2e0ec2b65..3ba2a913f 100644 --- a/plugins/builtin/romfs/themes/classic.json +++ b/plugins/builtin/romfs/themes/classic.json @@ -103,23 +103,23 @@ "title-bar-selected": "#5252A1FF" }, "implot": { - "axis-bg": "#00000000", - "axis-bg-active": "#00000000", - "axis-bg-hovered": "#00000000", + "axis-bg": "auto", + "axis-bg-active": "auto", + "axis-bg-hovered": "auto", "axis-grid": "#E5E5E53F", "axis-text": "#E5E5E5FF", - "axis-tick": "#0000003F", + "axis-tick": "auto", "crosshairs": "#7F7F7FBF", - "error-bar": "#E5E5E5FF", - "fill": "#00000000", + "error-bar": "auto", + "fill": "auto", "frame-bg": "#6D6D6D63", "inlay-text": "#E5E5E5FF", "legend-bg": "#1C1C23EA", "legend-border": "#7F7F7F7F", "legend-text": "#E5E5E5FF", - "line": "#00000000", - "marker-fill": "#00000000", - "marker-outline": "#00000000", + "line": "auto", + "marker-fill": "auto", + "marker-outline": "auto", "plot-bg": "#00000059", "plot-border": "#7F7F7F7F", "selection": "#F7F763FF", diff --git a/plugins/builtin/romfs/themes/dark.json b/plugins/builtin/romfs/themes/dark.json index 3ec414b13..ea614ed6c 100644 --- a/plugins/builtin/romfs/themes/dark.json +++ b/plugins/builtin/romfs/themes/dark.json @@ -103,23 +103,23 @@ "title-bar-selected": "#4296FAFF" }, "implot": { - "axis-bg": "#00000000", - "axis-bg-active": "#00000000", - "axis-bg-hovered": "#00000000", + "axis-bg": "auto", + "axis-bg-active": "auto", + "axis-bg-hovered": "auto", "axis-grid": "#FFFFFF3F", "axis-text": "#FFFFFFFF", - "axis-tick": "#00000000", + "axis-tick": "auto", "crosshairs": "#FFFFFF7F", - "error-bar": "#00000000", - "fill": "#00000000", + "error-bar": "auto", + "fill": "auto", "frame-bg": "#FFFFFF11", "inlay-text": "#FFFFFFFF", "legend-bg": "#141414EF", "legend-border": "#6D6D7F7F", "legend-text": "#FFFFFFFF", - "line": "#00000000", - "marker-fill": "#00000000", - "marker-outline": "#00000000", + "line": "auto", + "marker-fill": "auto", + "marker-outline": "auto", "plot-bg": "#0000007F", "plot-border": "#6D6D7F7F", "selection": "#FF9900FF", diff --git a/plugins/builtin/romfs/themes/light.json b/plugins/builtin/romfs/themes/light.json index cd03802a1..0a58fb7f0 100644 --- a/plugins/builtin/romfs/themes/light.json +++ b/plugins/builtin/romfs/themes/light.json @@ -103,23 +103,23 @@ "title-bar-selected": "#D1D1D1FF" }, "implot": { - "axis-bg": "#00000000", - "axis-bg-active": "#00000000", - "axis-bg-hovered": "#00000000", + "axis-bg": "auto", + "axis-bg-active": "auto", + "axis-bg-hovered": "auto", "axis-grid": "#FFFFFFFF", - "axis-text": "#000000FF", + "axis-text": "auto", "axis-tick": "#0000003F", "crosshairs": "#0000007F", - "error-bar": "#00000000", - "fill": "#00000000", + "error-bar": "auto", + "fill": "auto", "frame-bg": "#FFFFFFFF", "inlay-text": "#000000FF", "legend-bg": "#FFFFFFF9", "legend-border": "#D1D1D1CC", "legend-text": "#000000FF", - "line": "#00000000", - "marker-fill": "#00000000", - "marker-outline": "#00000000", + "line": "auto", + "marker-fill": "auto", + "marker-outline": "auto", "plot-bg": "#6B91FF21", "plot-border": "#00000000", "selection": "#D1A307FF",