From 2f93822996cac9d8aa71be6f2cf9f337b2998a97 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Sat, 21 Feb 2026 19:38:19 +0100 Subject: [PATCH] Scrollbar --- .../java/org/saturnclient/saturnclient/config/Theme.java | 6 ++++++ src/main/java/org/saturnclient/ui2/elements/Scroll.java | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/saturnclient/saturnclient/config/Theme.java b/src/main/java/org/saturnclient/saturnclient/config/Theme.java index 8036644..7471507 100644 --- a/src/main/java/org/saturnclient/saturnclient/config/Theme.java +++ b/src/main/java/org/saturnclient/saturnclient/config/Theme.java @@ -19,6 +19,9 @@ public class Theme { // Text/icons shown on accent background public static Property ACCENT_FG = Property.color(0xFF1A140A); + // Misc colors + public static Property SCROLL = Property.color(0xFFE2BF7D); + // UI metrics public static Property BG_RADIUS = Property.integer(12); public static Property WIDGET_RADIUS = Property.integer(10); @@ -35,8 +38,11 @@ public class Theme { config.property("Primary Foreground", PRIMARY_FG); config.property("Accent", ACCENT); config.property("Accent Foreground", ACCENT_FG); + config.property("Scrollbar Color", SCROLL); + config.property("Background Radius", BG_RADIUS); config.property("Widget Radius", WIDGET_RADIUS); + config.property("Font", WIDGET_RADIUS); } } diff --git a/src/main/java/org/saturnclient/ui2/elements/Scroll.java b/src/main/java/org/saturnclient/ui2/elements/Scroll.java index 7b78025..1be2461 100644 --- a/src/main/java/org/saturnclient/ui2/elements/Scroll.java +++ b/src/main/java/org/saturnclient/ui2/elements/Scroll.java @@ -11,8 +11,6 @@ import org.saturnclient.ui2.RenderScope; import org.saturnclient.ui2.components.ElementRenderer; public class Scroll extends Element { - private static Property scrollBarColor = Property.color(-7643914); - private static Property scrollBarRadius = Property.integer(10); private static Property scrollBarWidth = Property.integer(5); private static Property scrollBarPadding = Property.integer(5); @@ -39,7 +37,7 @@ public class Scroll extends Element { renderScope.disableScissor(); renderScope.drawRoundedRectangle(width - scrollBarWidth.value - scrollBarPadding.value, calculateScrollBarY(), - scrollBarWidth.value, calculateScrollBarHeight(), scrollBarRadius.value, scrollBarColor.value); + scrollBarWidth.value, calculateScrollBarHeight(), scrollBarRadius.value, Theme.SCROLL.value); } @Override