From 87177521833c5e2eed08962fbe968d7ff573ae2d Mon Sep 17 00:00:00 2001 From: crschnick Date: Wed, 6 Nov 2024 06:21:43 +0000 Subject: [PATCH] Derived style fixes --- app/src/main/java/io/xpipe/app/core/AppTheme.java | 10 ++++++---- .../resources/io/xpipe/app/resources/style/browser.css | 4 ---- .../resources/io/xpipe/app/resources/style/style.css | 4 ---- .../resources/io/xpipe/app/resources/theme/mocha.css | 3 +++ 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/core/AppTheme.java b/app/src/main/java/io/xpipe/app/core/AppTheme.java index 5687952ee..4eedead49 100644 --- a/app/src/main/java/io/xpipe/app/core/AppTheme.java +++ b/app/src/main/java/io/xpipe/app/core/AppTheme.java @@ -192,10 +192,12 @@ public class AppTheme { public static class DerivedTheme extends Theme { private final String name; + private final int skipLines; - public DerivedTheme(String id, String cssId, String name, atlantafx.base.theme.Theme theme) { + public DerivedTheme(String id, String cssId, String name, atlantafx.base.theme.Theme theme, int skipLines) { super(id, cssId, theme); this.name = name; + this.skipLines = skipLines; } @Override @@ -213,7 +215,7 @@ public class AppTheme { builder.append("\n") .append(baseStyleContent .lines() - .skip(builder.toString().lines().count()) + .skip(skipLines) .collect(Collectors.joining("\n"))); }); @@ -240,10 +242,10 @@ public class AppTheme { public static final Theme CUPERTINO_LIGHT = new Theme("cupertinoLight", "cupertino", new CupertinoLight()); public static final Theme CUPERTINO_DARK = new Theme("cupertinoDark", "cupertino", new CupertinoDark()); public static final Theme DRACULA = new Theme("dracula", "dracula", new Dracula()); - public static final Theme MOCHA = new DerivedTheme("mocha", "mocha", "Mocha", new PrimerDark()); + public static final Theme MOCHA = new DerivedTheme("mocha", "mocha", "Mocha", new PrimerDark(), 115); // Adjust this to create your own theme - public static final Theme CUSTOM = new DerivedTheme("custom", "primer", "Custom", new PrimerDark()); + public static final Theme CUSTOM = new DerivedTheme("custom", "primer", "Custom", new PrimerDark(), 115); // Also include your custom theme here public static final List ALL = List.of( diff --git a/app/src/main/resources/io/xpipe/app/resources/style/browser.css b/app/src/main/resources/io/xpipe/app/resources/style/browser.css index 5611bc350..96017b13c 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/browser.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/browser.css @@ -37,10 +37,6 @@ -fx-padding: 0.1em 0.2em; } -.browser .transfer .label .ikonli-font-icon { - -fx-icon-color: -color-fg-default; -} - .root.nord .transfer > * { -fx-background-radius: 0; -fx-border-radius: 0; diff --git a/app/src/main/resources/io/xpipe/app/resources/style/style.css b/app/src/main/resources/io/xpipe/app/resources/style/style.css index ef0b124b9..ed1e8bc22 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/style.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/style.css @@ -164,7 +164,3 @@ .root:performance:dark .store-active-comp .dot { -fx-fill: rgb(30, 180, 30, 0.7); } - -.custom-text-field .font-icon, .custom-text-field .ikonli-font-icon { - -fx-icon-color: -color-fg-default; -} diff --git a/app/src/main/resources/io/xpipe/app/resources/theme/mocha.css b/app/src/main/resources/io/xpipe/app/resources/theme/mocha.css index 4587c84b1..2c715af35 100644 --- a/app/src/main/resources/io/xpipe/app/resources/theme/mocha.css +++ b/app/src/main/resources/io/xpipe/app/resources/theme/mocha.css @@ -110,6 +110,9 @@ -color-chart-8-alpha20: rgba(136, 136, 136, 0.2); -fx-background-color: -color-bg-default; -fx-font-size: 14px; + -fx-background-radius: inherit; + -fx-background-insets: inherit; + -fx-padding: inherit; } .root { -color-bg-default-transparent: #0d1117d2; }