From f5c37c3771a440c6381513a17b2ad4667f431f62 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Fri, 15 Mar 2019 05:34:50 +0300 Subject: [PATCH] CSS updates for selection in table and context menu. --- .../Controllers/NSTableViewController.java | 3 +-- src/main/resources/res/app_dark.css | 15 +++++++++------ src/main/resources/res/app_light.css | 11 ++++++++--- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/main/java/nsusbloader/Controllers/NSTableViewController.java b/src/main/java/nsusbloader/Controllers/NSTableViewController.java index c11191d..01025d7 100644 --- a/src/main/java/nsusbloader/Controllers/NSTableViewController.java +++ b/src/main/java/nsusbloader/Controllers/NSTableViewController.java @@ -5,7 +5,6 @@ import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.event.EventHandler; @@ -233,4 +232,4 @@ public class NSTableViewController implements Initializable { table.refresh(); } -} +} \ No newline at end of file diff --git a/src/main/resources/res/app_dark.css b/src/main/resources/res/app_dark.css index 046ba9e..41329cf 100644 --- a/src/main/resources/res/app_dark.css +++ b/src/main/resources/res/app_dark.css @@ -193,7 +193,6 @@ .table-view .column-header-background .label{ -fx-background-color: transparent; -fx-text-fill: #08f3ff; - } .table-view .column-header-background, .table-view .filler{ -fx-background-color: #4f4f4f; @@ -202,14 +201,19 @@ .table-view .table-cell{ -fx-text-fill: #f7fafa; } -.table-row-cell, .table-row-cell:filled:selected, .table-row-cell:selected{ +.table-row-cell, .table-row-cell:selected, .table-row-cell:filled:selected{ -fx-background-color: -fx-table-cell-border-color, #424242; -fx-background-insets: 0, 0 0 1 0; -fx-padding: 0.0em; /* 0 */ -fx-table-cell-border-color: #6d8484; } - -.table-row-cell:odd, .table-row-cell:odd:filled:selected, .table-row-cell:odd:selected{ +.table-row-cell .text, .table-row-cell:odd .text{ + -fx-fill: #f7fafa; +} +.table-row-cell:filled:selected .text, .table-row-cell:odd:filled:selected .text{ + -fx-fill: #08f3ff; +} +.table-row-cell:odd, .table-row-cell:odd:selected, .table-row-cell:odd:filled:selected{ -fx-background-color: -fx-table-cell-border-color, #4f4f4f; -fx-background-insets: 0, 0 0 1 0; -fx-padding: 0.0em; /* 0 */ @@ -218,14 +222,13 @@ // -========================== Context menu =====================- .context-menu { -fx-background-color: #2d2d2d; - -fx-text-fill: white; -fx-cursor: hand; } .context-menu .menu-item .label { -fx-text-fill: #f7fafa; } .context-menu .menu-item:focused .label { - -fx-text-fill: #f7fafa; + -fx-text-fill: white; } diff --git a/src/main/resources/res/app_light.css b/src/main/resources/res/app_light.css index 92a11a4..c63ebdc 100644 --- a/src/main/resources/res/app_light.css +++ b/src/main/resources/res/app_light.css @@ -207,7 +207,13 @@ -fx-padding: 0.0em; /* 0 */ -fx-table-cell-border-color: #b0b0b0; } - +.table-row-cell .text, .table-row-cell:odd .text { + -fx-fill: #2c2c2c; +} +.table-row-cell:filled:selected .text, .table-row-cell:odd:filled:selected .text{ + -fx-fill: #2c2c2c; + -fx-font-weight: bold +} .table-row-cell:odd, .table-row-cell:odd:filled:selected, .table-row-cell:odd:selected{ -fx-background-color: -fx-table-cell-border-color, #fefefe; -fx-background-insets: 0, 0 0 1 0; @@ -217,14 +223,13 @@ // -========================== Context menu =====================- .context-menu { -fx-background-color: #fefefe; - -fx-text-fill: white; -fx-cursor: hand; } .context-menu .menu-item .label { -fx-text-fill: #2c2c2c; } .context-menu .menu-item:focused .label { - -fx-text-fill: #2c2c2c; + -fx-text-fill: white; }