Skip to content

Commit 89c9a93

Browse files
authored
优化深色模式下日志窗口筛选按钮的颜色 (#4912)
1 parent 74ec4aa commit 89c9a93

3 files changed

Lines changed: 44 additions & 20 deletions

File tree

HMCL/src/main/resources/assets/css/brightness-dark.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
}
88

99
.log-window {
10+
-fixed-log-toggle-selected: #DEE2E6;
11+
-fixed-log-toggle-unselected: #6C757D;
1012
-fixed-log-text-fill: #FFFFFF;
1113
-fixed-log-trace: #495057;
1214
-fixed-log-debug: #343A40;

HMCL/src/main/resources/assets/css/brightness-light.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
}
88

99
.log-window {
10+
-fixed-log-toggle-selected: #000000;
11+
-fixed-log-toggle-unselected: #6C757D;
1012
-fixed-log-text-fill: #000000;
1113
-fixed-log-trace: #EEE9E0;
1214
-fixed-log-debug: #EEE9E0;

HMCL/src/main/resources/assets/css/root.css

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,18 +1216,44 @@
12161216
* *
12171217
*******************************************************************************/
12181218

1219-
.log-toggle:selected {
1220-
-fx-background-color: transparent;
1219+
.log-toggle {
12211220
-fx-border: 1px;
1222-
-fx-border-color: black;
1223-
-fx-text-fill: black;
1221+
-fx-border-color: -fixed-log-toggle-unselected;
1222+
-fx-text-fill: -fixed-log-toggle-unselected;
12241223
}
12251224

1226-
.log-toggle {
1227-
-fx-background-color: transparent;
1225+
.log-toggle:selected {
12281226
-fx-border: 1px;
1229-
-fx-border-color: gray;
1230-
-fx-text-fill: gray;
1227+
-fx-border-color: -fixed-log-toggle-selected;
1228+
-fx-text-fill: -fixed-log-toggle-selected;
1229+
}
1230+
1231+
.log-toggle.fatal {
1232+
-fx-background-color: -fixed-log-fatal;
1233+
}
1234+
1235+
.log-toggle.error {
1236+
-fx-background-color: -fixed-log-error;
1237+
}
1238+
1239+
.log-toggle.warn {
1240+
-fx-background-color: -fixed-log-warn;
1241+
}
1242+
1243+
.log-toggle.info {
1244+
-fx-background-color: -fixed-log-info;
1245+
}
1246+
1247+
.log-toggle.debug {
1248+
-fx-background-color: -fixed-log-debug;
1249+
}
1250+
1251+
.log-toggle.trace {
1252+
-fx-background-color: -fixed-log-trace;
1253+
}
1254+
1255+
.log-window-list-cell:selected {
1256+
-fx-background-color: -fixed-log-selected;
12311257
}
12321258

12331259
.log-window {
@@ -1252,38 +1278,32 @@
12521278
-fx-border-width: 0;
12531279
}
12541280

1255-
.log-window-list-cell:fatal,
1256-
.log-toggle.fatal {
1281+
.log-window-list-cell:fatal {
12571282
-fx-text-fill: -fixed-log-text-fill;
12581283
-fx-background-color: -fixed-log-fatal;
12591284
}
12601285

1261-
.log-window-list-cell:error,
1262-
.log-toggle.error {
1286+
.log-window-list-cell:error {
12631287
-fx-text-fill: -fixed-log-text-fill;
12641288
-fx-background-color: -fixed-log-error;
12651289
}
12661290

1267-
.log-window-list-cell:warn,
1268-
.log-toggle.warn {
1291+
.log-window-list-cell:warn {
12691292
-fx-text-fill: -fixed-log-text-fill;
12701293
-fx-background-color: -fixed-log-warn;
12711294
}
12721295

1273-
.log-window-list-cell:info,
1274-
.log-toggle.info {
1296+
.log-window-list-cell:info {
12751297
-fx-text-fill: -fixed-log-text-fill;
12761298
-fx-background-color: -fixed-log-info;
12771299
}
12781300

1279-
.log-window-list-cell:debug,
1280-
.log-toggle.debug {
1301+
.log-window-list-cell:debug {
12811302
-fx-text-fill: -fixed-log-text-fill;
12821303
-fx-background-color: -fixed-log-debug;
12831304
}
12841305

1285-
.log-window-list-cell:trace,
1286-
.log-toggle.trace {
1306+
.log-window-list-cell:trace {
12871307
-fx-text-fill: -fixed-log-text-fill;
12881308
-fx-background-color: -fixed-log-trace;
12891309
}

0 commit comments

Comments
 (0)