From 507cade50dcf78b00ad3723b9e444bd2323cae01 Mon Sep 17 00:00:00 2001 From: yushijinhun Date: Fri, 8 Feb 2019 17:08:23 +0800 Subject: [PATCH 1/3] polish authlib-injector --- .../hmcl/auth/authlibinjector/AuthlibInjectorAccount.java | 2 +- .../hmcl/auth/authlibinjector/AuthlibInjectorDownloader.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/authlibinjector/AuthlibInjectorAccount.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/authlibinjector/AuthlibInjectorAccount.java index 0e96efdf4..4c8d7d8d9 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/authlibinjector/AuthlibInjectorAccount.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/authlibinjector/AuthlibInjectorAccount.java @@ -115,7 +115,7 @@ public class AuthlibInjectorAccount extends YggdrasilAccount { return new Arguments().addJVMArguments( "-javaagent:" + artifact.getLocation().toString() + "=" + server.getUrl(), "-Dauthlibinjector.side=client", - "-Dorg.to2mbn.authlibinjector.config.prefetched=" + Base64.getEncoder().encodeToString(prefetchedMeta.getBytes(UTF_8))); + "-Dauthlibinjector.yggdrasil.prefetched=" + Base64.getEncoder().encodeToString(prefetchedMeta.getBytes(UTF_8))); } @Override diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/authlibinjector/AuthlibInjectorDownloader.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/authlibinjector/AuthlibInjectorDownloader.java index 566b1bc97..cf3c757e7 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/authlibinjector/AuthlibInjectorDownloader.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/auth/authlibinjector/AuthlibInjectorDownloader.java @@ -127,7 +127,7 @@ public class AuthlibInjectorDownloader implements AuthlibInjectorArtifactProvide } } - private class AuthlibInjectorVersionInfo { + private static class AuthlibInjectorVersionInfo { @SerializedName("build_number") public int buildNumber; From 8d75b2d413c4f658412f41e11f2f7fa6c6c446c6 Mon Sep 17 00:00:00 2001 From: yushijinhun Date: Sat, 9 Feb 2019 21:37:26 +0800 Subject: [PATCH 2/3] Fix #519 --- HMCL/src/main/resources/assets/css/root.css | 46 ++------------------- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/HMCL/src/main/resources/assets/css/root.css b/HMCL/src/main/resources/assets/css/root.css index 1e5b15ad2..bc1aed23f 100644 --- a/HMCL/src/main/resources/assets/css/root.css +++ b/HMCL/src/main/resources/assets/css/root.css @@ -536,62 +536,24 @@ * * *******************************************************************************/ -.custom-jfx-button-raised .jfx-rippler { - -jfx-rippler-fill: YELLOW; -} - -.custom-jfx-button-raised { - -fx-padding: 0.7em 0.57em; - -fx-font-size: 14.0px; - -jfx-button-type: RAISED; - -fx-background-color: rgb(102.0, 153.0, 102.0); - -fx-pref-width: 200.0; - -fx-text-fill: WHITE; -} - -.circle-jfx-button-raised .jfx-rippler { - -jfx-rippler-fill: YELLOW; -} - -.circle-jfx-button-raised { - -fx-padding: 0.7em 0.57em; - -fx-font-size: 14.0px; - -jfx-button-type: RAISED; - -fx-background-color: rgb(102.0, 153.0, 102.0); - -fx-pref-width: 200.0; - -fx-text-fill: WHITE; - -jfx-mask-type: CIRCLE; -} - .jfx-button-raised { - -fx-text-fill: white; -fx-background-color: -fx-base-color; - -fx-font-size: 14px; } -.jfx-button-raised .jfx-rippler { - -jfx-rippler-fill: white; -} - -.jfx-button-raised .label { - -fx-text-fill: white; +.jfx-button-raised, .jfx-button-raised * { + -fx-text-fill: -fx-base-text-fill; -fx-font-size: 14px; } .jfx-button-border { - -fx-text-fill: -fx-base-color; -fx-border-color: gray; -fx-border-radius: 5px; -fx-border-width: 0.2px; -fx-padding: 8px; } -.jfx-button-border .jfx-rippler { - -jfx-rippler-fill: -fx-base-check-color; -} - -.jfx-button-border .label { - -fx-text-fill: -fx-base-color; +.jfx-button-border, .jfx-button-border * { + -fx-text-fill: -fx-base-darker-color; } .jfx-button-raised-round { From 0bee306d67f1dcf90c5b6309fba9f6745d222205 Mon Sep 17 00:00:00 2001 From: yushijinhun Date: Sat, 9 Feb 2019 21:44:14 +0800 Subject: [PATCH 3/3] css clean up --- HMCL/src/main/resources/assets/css/root.css | 133 -------------------- 1 file changed, 133 deletions(-) diff --git a/HMCL/src/main/resources/assets/css/root.css b/HMCL/src/main/resources/assets/css/root.css index bc1aed23f..68fcfcf4d 100644 --- a/HMCL/src/main/resources/assets/css/root.css +++ b/HMCL/src/main/resources/assets/css/root.css @@ -342,7 +342,6 @@ .jfx-tool-bar HBox { -fx-alignment: center; -/* -fx-spacing: 25.0;*/ -fx-padding: 0.0 5.0; } @@ -447,33 +446,6 @@ -fx-fill: -fx-base-check-color; } -.custom-jfx-radio-button { - -fx-font-size: 16.0px; -} - -.custom-jfx-radio-button .radio { - -fx-stroke-width: 2.0px; - -fx-fill: transparent; -} - -.custom-jfx-radio-button-blue { - -fx-text-fill: -fx-base-color; - -jfx-selected-color: -fx-base-color; - -jfx-unselected-color: #212121; -} - -.custom-jfx-radio-button-red { - -fx-text-fill: #f44336; - -jfx-selected-color: #f44336; - -jfx-unselected-color: #b71c1c; -} - -.custom-jfx-radio-button-green { - -fx-text-fill: #4caf50; - -jfx-selected-color: #4caf50; - -jfx-unselected-color: #1b5e20; -} - /******************************************************************************* * * * JFX Slider * @@ -514,18 +486,12 @@ -fx-font-size: 10.0; } -/******************************************************/ - /******************************************************************************* * * * JFX Rippler * * * *******************************************************************************/ -/*.jfx-rippler { - -fx-rippler-fill: -fx-base-color; - -fx-mask-type: RECT; -}*/ .jfx-rippler:hover { -fx-cursor: hand; } @@ -572,20 +538,6 @@ -jfx-checked-color: -fx-base-check-color; } -.custom-jfx-check-box { - -jfx-checked-color: RED; -} - -.custom-jfx-check-box-all-colored { - -jfx-checked-color: -fx-base-color; - -jfx-unchecked-color: -fx-base-color; - -fx-text-fill: -fx-base-color; -} - -.custom-jfx-check-box-text-colored { - -fx-text-fill: rgb(153.0, 0.0, 0.0); -} - /******************************************************************************* * * * JFX Progress Bar * @@ -609,15 +561,6 @@ -fx-background-color: -fx-base-check-color; } -.custom-jfx-progress-bar > .bar { - -fx-background-color: rgb(255.0, 128.0, 0.0); -} - -.custom-jfx-progress-bar-stroke > .bar { - -fx-background-color: -fx-base-color; - -fx-padding: 6; -} - /******************************************************************************* * * * JFX Textfield * @@ -670,47 +613,6 @@ -jfx-expanded: false; } -.custom-jfx-list-view .jfx-list-cell:odd:selected > .jfx-rippler > StackPane, -.custom-jfx-list-view .jfx-list-cell:even:selected > .jfx-rippler > StackPane { - -fx-background-color: rgba(255, 0, 0, 0.2); -} - -.custom-jfx-list-view { - -fx-background-insets: 0.0; - -jfx-cell-horizontal-margin: 0.0; - -jfx-cell-vertical-margin: 5.0; - -jfx-expanded: false; - -fx-max-width: 200.0px; - /* important to hide the list change of height */ - -fx-background-color: TRANSPARENT; -} - -.custom-jfx-list-view .jfx-rippler { - -jfx-rippler-fill: RED; -} - -.custom-jfx-list-view1 { - -jfx-vertical-gap: 10.0; - -fx-pref-width: 150px; - -fx-background-color: transparent; -} - -.custom-jfx-list-view-icon, -.jfx-list-cell:selected .label .custom-jfx-list-view-icon { - -fx-fill: -fx-base-color; - -fx-padding: 0.0 10.0 0.0 5.0; - -fx-cursor: hand; -} - -.custom-jfx-list-view-icon-container { - -fx-pref-width: 40px; -} - -.custom-jfx-list-view .sublist-item { - -fx-border-color: #e0e0e0; - -fx-border-width: 1 0 1 0; -} - .options-list { -fx-background-color: transparent; -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 5, 0.06, -0.5, 1); @@ -760,20 +662,6 @@ -jfx-mask-type: CIRCLE; } -.custom-jfx-list-view .jfx-list-cell .sublist-header > .drop-icon { - -fx-background-color: GRAY; -} - -.custom-jfx-list-view .jfx-list-cell:filled:hover .sublist-header > .drop-icon { - -fx-background-color: BLACK; -} - -/*******************************************************************************/ -/*******************************************************************************/ -/*******************************************************************************/ -/*******************************************************************************/ -/*******************************************************************************/ -/*******************************************************************************/ /******************************************************************************* * * * JFX SUBLIST IMPORTANT * @@ -813,10 +701,6 @@ -fx-padding: 0 0 0 12; } -/*.custom-jfx-list-view .sublist-container { - -fx-padding : 0 0 5 0; -}*/ - /******************************************************************************* * * * JFX Toggle Button * @@ -827,14 +711,6 @@ -jfx-toggle-color: -fx-base-check-color; } -.custom-jfx-toggle-button { - -jfx-toggle-color: #4285F4; -} - -.custom-jfx-toggle-button-red { - -jfx-toggle-color: red; -} - .toggle-label { -fx-font-size: 14.0px; } @@ -1324,12 +1200,3 @@ .fit-width { -fx-pref-width: 100%; } -/* -.jfx-scroll-pane .main-header { - -fx-background-image: url("../bg1.jpg"); -} - -.jfx-scroll-pane .condensed-header { - -fx-background-image: url("../bg4.jpg"); -} -*/ \ No newline at end of file