From f454bc4d0d7709030d74baa7b12875395db68916 Mon Sep 17 00:00:00 2001 From: Pedro Duque Vieira Date: Tue, 29 Sep 2020 12:39:32 +0100 Subject: [PATCH] Fixes #172: TreeTableView - Collapse/Expand arrow color is wrong on DARK Style --- .../styles/jmetro/TreeTableViewSample.java | 15 +++++---------- .../main/resources/jfxtras/styles/jmetro/base.css | 4 ++++ .../jfxtras/styles/jmetro/dark_theme.css | 1 + .../jfxtras/styles/jmetro/light_theme.css | 1 + 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/jmetro--samples/src/main/java/jfxtras/styles/jmetro/TreeTableViewSample.java b/jmetro--samples/src/main/java/jfxtras/styles/jmetro/TreeTableViewSample.java index ece8113..5ca7177 100644 --- a/jmetro--samples/src/main/java/jfxtras/styles/jmetro/TreeTableViewSample.java +++ b/jmetro--samples/src/main/java/jfxtras/styles/jmetro/TreeTableViewSample.java @@ -17,7 +17,7 @@ public class TreeTableViewSample extends Application { - private static final Style STYLE = Style.DARK; + private static final Style STARTING_STYLE = Style.DARK; List employees = Arrays.asList( new Employee("Ethan Williams", "ethan.williams@example.com", "25", "Manager", "San Francisco"), @@ -47,8 +47,7 @@ public static void main(String[] args) { @Override public void start(Stage stage) { - Style startingStyle = Style.LIGHT; - JMetro jMetro = new JMetro(startingStyle); + JMetro jMetro = new JMetro(STARTING_STYLE); System.setProperty("prism.lcdtext", "false"); @@ -111,15 +110,11 @@ public void start(Stage stage) { controlsHBox.setSpacing(10); CheckBox cellSelectionCheckBox = new CheckBox("Cell Selection"); - cellSelectionCheckBox.setOnAction(event -> { - treeTableView.getSelectionModel().setCellSelectionEnabled(cellSelectionCheckBox.isSelected()); - }); + cellSelectionCheckBox.setOnAction(event -> treeTableView.getSelectionModel().setCellSelectionEnabled(cellSelectionCheckBox.isSelected())); cellSelectionCheckBox.setSelected(treeTableView.getSelectionModel().isCellSelectionEnabled()); CheckBox tableButtonCheckBox = new CheckBox("Table Menu Button"); - tableButtonCheckBox.setOnAction(event -> { - treeTableView.setTableMenuButtonVisible(tableButtonCheckBox.isSelected()); - }); + tableButtonCheckBox.setOnAction(event -> treeTableView.setTableMenuButtonVisible(tableButtonCheckBox.isSelected())); tableButtonCheckBox.setSelected(treeTableView.isTableMenuButtonVisible()); CheckBox alternatingRowColors = new CheckBox("Alternating Row Colors"); @@ -147,7 +142,7 @@ public void start(Stage stage) { ComboBox