修复对话框按钮自行移动的问题 (#3423)

* 修复对话框按钮自行移动的问题

* update

* update

* update
This commit is contained in:
Glavo 2024-11-04 18:41:14 +08:00 committed by GitHub
parent 09e9e934d3
commit 898750d058
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View File

@ -153,11 +153,14 @@ public class Theme {
.append("-fx-base-text-fill:").append(getColorDisplayName(getForegroundColor())).append(";") .append("-fx-base-text-fill:").append(getColorDisplayName(getForegroundColor())).append(";")
.append("-theme-thumb:").append(rgba(paint, 0.7)).append(";"); .append("-theme-thumb:").append(rgba(paint, 0.7)).append(";");
if (fontFamily != null) { if (fontFamily == null)
// https://github.com/HMCL-dev/HMCL/pull/3423
themeBuilder.append("-fx-font-family: -fx-base-font-family;");
else
themeBuilder.append("-fx-font-family:\"").append(fontFamily).append("\";"); themeBuilder.append("-fx-font-family:\"").append(fontFamily).append("\";");
if (fontStyle != null && !fontStyle.isEmpty())
themeBuilder.append("-fx-font-style:\"").append(fontStyle).append("\";"); if (fontStyle != null && !fontStyle.isEmpty())
} themeBuilder.append("-fx-font-style:\"").append(fontStyle).append("\";");
themeBuilder.append('}'); themeBuilder.append('}');

View File

@ -24,5 +24,8 @@
-fx-base-disabled-text-fill: rgba(256, 256, 256, 0.7); -fx-base-disabled-text-fill: rgba(256, 256, 256, 0.7);
-fx-base-text-fill: white; -fx-base-text-fill: white;
/* https://github.com/HMCL-dev/HMCL/pull/3423 */
-fx-font-family: -fx-base-font-family;
-theme-thumb: rgba(92, 107, 192, 0.7); -theme-thumb: rgba(92, 107, 192, 0.7);
} }