From b2a7c6f4137443b103a09e7a5a8b93faa12c7224 Mon Sep 17 00:00:00 2001 From: ix0rai Date: Sat, 30 Nov 2024 22:09:37 -0600 Subject: [PATCH] orange! --- .../enigma/gui/config/theme/ThemeUtil.java | 3 +- .../composite/SyntaxPaneProperties.java | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/theme/ThemeUtil.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/theme/ThemeUtil.java index f2dfcc463..ad8a11e74 100644 --- a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/theme/ThemeUtil.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/theme/ThemeUtil.java @@ -96,8 +96,7 @@ public static BoxHighlightPainter createDebugPainter() { } public static BoxHighlightPainter createFallbackPainter() { - // todo proper colours - return BoxHighlightPainter.create(Config.getCurrentSyntaxPaneColors().proposed.value(), Config.getCurrentSyntaxPaneColors().debugTokenOutline.value()); + return BoxHighlightPainter.create(Config.getCurrentSyntaxPaneColors().fallback.value(), Config.getCurrentSyntaxPaneColors().fallbackOutline.value()); } public static void resetIfAbsent(TrackedValue value) { diff --git a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/theme/properties/composite/SyntaxPaneProperties.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/theme/properties/composite/SyntaxPaneProperties.java index c288e6e92..691f3297b 100644 --- a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/theme/properties/composite/SyntaxPaneProperties.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/theme/properties/composite/SyntaxPaneProperties.java @@ -49,6 +49,9 @@ public static class Colors implements Consumer { public final TrackedValue deobfuscated; public final TrackedValue deobfuscatedOutline; + public final TrackedValue fallback; + public final TrackedValue fallbackOutline; + public final TrackedValue editorBackground; public final TrackedValue highlight; public final TrackedValue caret; @@ -78,6 +81,9 @@ private Colors( ThemeProperties.SerializableColor deobfuscated, ThemeProperties.SerializableColor deobfuscatedOutline, + ThemeProperties.SerializableColor fallback, + ThemeProperties.SerializableColor fallbackOutline, + ThemeProperties.SerializableColor editorBackground, ThemeProperties.SerializableColor highlight, ThemeProperties.SerializableColor caret, @@ -106,6 +112,9 @@ private Colors( this.deobfuscated = TrackedValue.create(deobfuscated, "deobfuscated"); this.deobfuscatedOutline = TrackedValue.create(deobfuscatedOutline, "deobfuscated_outline"); + this.fallback = TrackedValue.create(fallback, "fallback"); + this.fallbackOutline = TrackedValue.create(fallback, "fallbackOutline"); + this.editorBackground = TrackedValue.create(editorBackground, "editor_background"); this.highlight = TrackedValue.create(highlight, "highlight"); this.caret = TrackedValue.create(caret, "caret"); @@ -142,6 +151,9 @@ public Stream> stream() { this.deobfuscated, this.deobfuscatedOutline, + this.fallback, + this.fallbackOutline, + this.editorBackground, this.highlight, this.caret, @@ -177,6 +189,11 @@ public static class Builder { private ThemeProperties.SerializableColor deobfuscated = new ThemeProperties.SerializableColor(0xFFDCFFDC); private ThemeProperties.SerializableColor deobfuscatedOutline = new ThemeProperties.SerializableColor(0xFF50A050); + // todo defaults for other themes + // todo better colours + private ThemeProperties.SerializableColor fallback = new ThemeProperties.SerializableColor(0x60eb8f34); + private ThemeProperties.SerializableColor fallbackOutline = new ThemeProperties.SerializableColor(0xFFeb8f34); + private ThemeProperties.SerializableColor editorBackground = new ThemeProperties.SerializableColor(0xFFFFFFFF); private ThemeProperties.SerializableColor highlight = new ThemeProperties.SerializableColor(0xFF3333EE); private ThemeProperties.SerializableColor caret = new ThemeProperties.SerializableColor(0xFF000000); @@ -207,6 +224,9 @@ public Colors build() { this.deobfuscated, this.deobfuscatedOutline, + this.fallback, + this.fallbackOutline, + this.editorBackground, this.highlight, this.caret, @@ -270,6 +290,16 @@ public Builder deobfuscatedOutline(ThemeProperties.SerializableColor deobfuscate return this; } + public Builder fallback(ThemeProperties.SerializableColor fallback) { + this.fallback = fallback; + return this; + } + + public Builder fallbackOutline(ThemeProperties.SerializableColor fallbackOutline) { + this.fallbackOutline = fallbackOutline; + return this; + } + public Builder editorBackground(ThemeProperties.SerializableColor editorBackground) { this.editorBackground = editorBackground; return this;