Skip to content

Commit

Permalink
orange!
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Dec 1, 2024
1 parent 0a635dd commit b2a7c6f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <T> void resetIfAbsent(TrackedValue<T> value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public static class Colors implements Consumer<Config.SectionBuilder> {
public final TrackedValue<ThemeProperties.SerializableColor> deobfuscated;
public final TrackedValue<ThemeProperties.SerializableColor> deobfuscatedOutline;

public final TrackedValue<ThemeProperties.SerializableColor> fallback;
public final TrackedValue<ThemeProperties.SerializableColor> fallbackOutline;

public final TrackedValue<ThemeProperties.SerializableColor> editorBackground;
public final TrackedValue<ThemeProperties.SerializableColor> highlight;
public final TrackedValue<ThemeProperties.SerializableColor> caret;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -142,6 +151,9 @@ public Stream<TrackedValue<ThemeProperties.SerializableColor>> stream() {
this.deobfuscated,
this.deobfuscatedOutline,

this.fallback,
this.fallbackOutline,

this.editorBackground,
this.highlight,
this.caret,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -207,6 +224,9 @@ public Colors build() {
this.deobfuscated,
this.deobfuscatedOutline,

this.fallback,
this.fallbackOutline,

this.editorBackground,
this.highlight,
this.caret,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b2a7c6f

Please sign in to comment.