[Enhancement] 给 TableView 添加样式 (#4854)
This commit is contained in:
@@ -102,6 +102,7 @@ public class ModUpdatesPage extends BorderPane implements DecoratorPage {
|
||||
TableView<ModUpdateObject> table = new TableView<>(objects);
|
||||
table.setEditable(true);
|
||||
table.getColumns().setAll(enabledColumn, fileNameColumn, currentVersionColumn, targetVersionColumn, sourceColumn);
|
||||
setMargin(table, new Insets(10, 10, 5, 10));
|
||||
|
||||
setCenter(table);
|
||||
|
||||
|
||||
@@ -1508,6 +1508,63 @@
|
||||
-fx-background-color: -monet-on-surface;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* *
|
||||
* Table View *
|
||||
* *
|
||||
******************************************************************************/
|
||||
|
||||
/* WE DEFINITELY NEED JFX TABLE-VIEW */
|
||||
|
||||
.table-view {
|
||||
-fx-padding: 3;
|
||||
-fx-background-color: -monet-surface-container-low;
|
||||
}
|
||||
|
||||
.table-view,
|
||||
.table-view .column-header,
|
||||
.table-view .filler,
|
||||
.table-view .column-header-background,
|
||||
.table-row-cell {
|
||||
-fx-background-radius: 6;
|
||||
-fx-border-radius: 6;
|
||||
}
|
||||
|
||||
.table-view .column-header,
|
||||
.table-view .filler {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.table-view .column-header-background {
|
||||
-fx-background-color: -monet-surface-container-highest;
|
||||
}
|
||||
|
||||
.table-row-cell {
|
||||
-fx-background-color: -monet-surface-container;
|
||||
-fx-table-cell-border-color: -monet-surface-container-lowest;
|
||||
}
|
||||
|
||||
.table-row-cell:odd {
|
||||
-fx-background-color: -monet-surface-container-high;
|
||||
}
|
||||
|
||||
.table-cell {
|
||||
-fx-background-color: transparent;
|
||||
-fx-text-fill: -monet-on-surface;
|
||||
}
|
||||
|
||||
.table-view > .virtual-flow > .clipped-container > .sheet > .table-row-cell:filled:selected {
|
||||
-fx-background-color: -monet-secondary-container;
|
||||
}
|
||||
|
||||
.table-view > .virtual-flow > .scroll-bar {
|
||||
-fx-skin: "org.jackhuang.hmcl.ui.construct.FloatScrollBarSkin";
|
||||
}
|
||||
|
||||
.table-view > .virtual-flow > .scroll-bar .track {
|
||||
-fx-fill: transparent;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* *
|
||||
* JFX Decorator *
|
||||
|
||||
Reference in New Issue
Block a user