From 33dcd51cd776c0b48d7398c8adf7cf83ccae370f Mon Sep 17 00:00:00 2001 From: nicholas Date: Tue, 15 Oct 2024 18:19:42 +1100 Subject: [PATCH 1/4] Fixed issue for light mode - .main-table data was overwriting the selection colour --- src/main/java/org/jabref/gui/Base.css | 149 -------------------------- 1 file changed, 149 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index 49d581717c7..f4c73cfa0ff 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -1560,155 +1560,6 @@ We want to have a look that matches our icons in the tool-bar */ -fx-padding: -2 0 0 0; } -/** even and odd are swapped around somehow. Below "odd" matches lines 2, 4, ... **/ - -.main-table .table-row-cell:matching-search-and-groups { - -fx-background-color: -jr-match-1-even; -} -.main-table .table-row-cell:matching-search-and-groups > .table-cell { - -fx-text-fill: -jr-match-1-text-color; -} -.main-table .table-row-cell:matching-search-and-groups:focused > .table-cell { - -fx-text-fill: -fx-focused-text-base-color; -} -.main-table .table-row-cell:matching-search-and-groups:focused:hover > .table-cell { - -fx-text-fill: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-search-and-groups:focused:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-search-and-groups:hover > .table-cell { - -fx-text-fill: -jr-hover-text; -} -.main-table .table-row-cell:matching-search-and-groups > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-match-1-text-color; -} -.main-table .table-row-cell:matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-hover-text; -} -.main-table .table-row-cell:matching-search-and-groups:odd { - -fx-background-color: -jr-match-1-odd; -} -.main-table .table-row-cell:matching-search-and-groups:odd:selected, -.main-table .table-row-cell:matching-search-and-groups:odd:focused, -.main-table .table-row-cell:matching-search-and-groups:odd:focused:hover, -.main-table .table-row-cell:matching-search-and-groups:focused:hover { - -fx-background-color: -jr-selected; -} -.main-table .table-row-cell:matching-search-and-groups:odd:hover { - -fx-background-color: -jr-hover; -} - -.main-table .table-row-cell:matching-search-not-groups { - -fx-background-color: -jr-match-2-even; -} -.main-table .table-row-cell:matching-search-not-groups > .table-cell { - -fx-text-fill: -jr-match-2-text-color; -} -.main-table .table-row-cell:matching-search-not-groups:focused > .table-cell { - -fx-text-fill: -fx-focused-text-base-color; -} -.main-table .table-row-cell:matching-search-not-groups:focused:hover > .table-cell { - -fx-text-fill: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-search-not-groups:focused:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-search-not-groups:hover > .table-cell { - -fx-text-fill: -jr-hover-text; -} -.main-table .table-row-cell:matching-search-not-groups > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-match-2-text-color; -} -.main-table .table-row-cell:matching-search-not-groups:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-hover-text; -} -.main-table .table-row-cell:matching-search-not-groups:odd { - -fx-background-color: -jr-match-2-odd; -} -.main-table .table-row-cell:matching-search-not-groups:odd:selected, -.main-table .table-row-cell:matching-search-not-groups:odd:focused, -.main-table .table-row-cell:matching-search-not-groups:odd:focused:hover, -.main-table .table-row-cell:matching-search-not-groups:focused:hover { - -fx-background-color: -jr-selected; -} -.main-table .table-row-cell:matching-search-not-groups:odd:hover { - -fx-background-color: -jr-hover; -} - -.main-table .table-row-cell:matching-groups-not-search { - -fx-background-color: -jr-match-3-even; -} -.main-table .table-row-cell:matching-groups-not-search > .table-cell { - -fx-text-fill: -jr-match-3-text-color; -} -.main-table .table-row-cell:matching-groups-not-search:focused > .table-cell { - -fx-text-fill: -fx-focused-text-base-color; -} -.main-table .table-row-cell:matching-groups-not-search:focused:hover > .table-cell { - -fx-text-fill: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-groups-not-search:focused:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-groups-not-search:hover > .table-cell { - -fx-text-fill: -jr-hover-text; -} -.main-table .table-row-cell:matching-groups-not-search > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-match-3-text-color; -} -.main-table .table-row-cell:matching-groups-not-search:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-hover-text; -} -.main-table .table-row-cell:matching-groups-not-search:odd { - -fx-background-color: -jr-match-3-odd; -} -.main-table .table-row-cell:matching-groups-not-search:odd:selected, -.main-table .table-row-cell:matching-groups-not-search:odd:focused, -.main-table .table-row-cell:matching-groups-not-search:odd:focused:hover, -.main-table .table-row-cell:matching-groups-not-search:focused:hover { - -fx-background-color: -jr-selected; -} -.main-table .table-row-cell:matching-groups-not-search:odd:hover { - -fx-background-color: -jr-hover; -} - -.main-table .table-row-cell:not-matching-search-and-groups { - -fx-background-color: -jr-match-4-even; -} -.main-table .table-row-cell:not-matching-search-and-groups > .table-cell { - -fx-text-fill: -jr-match-4-text-color; -} -.main-table .table-row-cell:not-matching-search-and-groups:focused > .table-cell { - -fx-text-fill: -fx-focused-text-base-color; -} -.main-table .table-row-cell:not-matching-search-and-groups:focused:hover > .table-cell { - -fx-text-fill: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:not-matching-search-and-groups:focused:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:not-matching-search-and-groups:hover > .table-cell { - -fx-text-fill: -jr-hover-text; -} -.main-table .table-row-cell:not-matching-search-and-groups > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-match-4-text-color; -} -.main-table.table-row-cell:not-matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-hover-text; -} -.main-table .table-row-cell:not-matching-search-and-groups:odd { - -fx-background-color: -jr-match-4-odd; -} -.main-table .table-row-cell:not-matching-search-and-groups:odd:selected, -.main-table .table-row-cell:not-matching-search-and-groups:odd:focused, -.main-table .table-row-cell:not-matching-search-and-groups:odd:focused:hover, -.main-table .table-row-cell:not-matching-search-and-groups:focused:hover { - -fx-background-color: -jr-selected; -} -.main-table .table-row-cell:not-matching-search-and-groups:odd:hover { - -fx-background-color: -jr-hover; -} .rating > .container { -fx-spacing: 2; From 0140b66aa5ece0ae8011a98387e331603d51cdfa Mon Sep 17 00:00:00 2001 From: nicholas Date: Tue, 15 Oct 2024 18:24:26 +1100 Subject: [PATCH 2/4] Re-included deleted css code which doesn't affect the highlight. --- src/main/java/org/jabref/gui/Base.css | 147 ++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index f4c73cfa0ff..aa646506a75 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -1560,6 +1560,153 @@ We want to have a look that matches our icons in the tool-bar */ -fx-padding: -2 0 0 0; } +/** even and odd are swapped around somehow. Below "odd" matches lines 2, 4, ... **/ + + +.main-table .table-row-cell:matching-search-and-groups > .table-cell { + -fx-text-fill: -jr-match-1-text-color; +} +.main-table .table-row-cell:matching-search-and-groups:focused > .table-cell { + -fx-text-fill: -fx-focused-text-base-color; +} +.main-table .table-row-cell:matching-search-and-groups:focused:hover > .table-cell { + -fx-text-fill: -jr-maintable-focused-hover-text; +} +.main-table .table-row-cell:matching-search-and-groups:focused:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-maintable-focused-hover-text; +} +.main-table .table-row-cell:matching-search-and-groups:hover > .table-cell { + -fx-text-fill: -jr-hover-text; +} +.main-table .table-row-cell:matching-search-and-groups > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-match-1-text-color; +} +.main-table .table-row-cell:matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-hover-text; +} +.main-table .table-row-cell:matching-search-and-groups:odd { + -fx-background-color: -jr-match-1-odd; +} +.main-table .table-row-cell:matching-search-and-groups:odd:selected, +.main-table .table-row-cell:matching-search-and-groups:odd:focused, +.main-table .table-row-cell:matching-search-and-groups:odd:focused:hover, +.main-table .table-row-cell:matching-search-and-groups:focused:hover { + -fx-background-color: -jr-selected; +} +.main-table .table-row-cell:matching-search-and-groups:odd:hover { + -fx-background-color: -jr-hover; +} + +.main-table .table-row-cell:matching-search-not-groups { + -fx-background-color: -jr-match-2-even; +} +.main-table .table-row-cell:matching-search-not-groups > .table-cell { + -fx-text-fill: -jr-match-2-text-color; +} +.main-table .table-row-cell:matching-search-not-groups:focused > .table-cell { + -fx-text-fill: -fx-focused-text-base-color; +} +.main-table .table-row-cell:matching-search-not-groups:focused:hover > .table-cell { + -fx-text-fill: -jr-maintable-focused-hover-text; +} +.main-table .table-row-cell:matching-search-not-groups:focused:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-maintable-focused-hover-text; +} +.main-table .table-row-cell:matching-search-not-groups:hover > .table-cell { + -fx-text-fill: -jr-hover-text; +} +.main-table .table-row-cell:matching-search-not-groups > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-match-2-text-color; +} +.main-table .table-row-cell:matching-search-not-groups:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-hover-text; +} +.main-table .table-row-cell:matching-search-not-groups:odd { + -fx-background-color: -jr-match-2-odd; +} +.main-table .table-row-cell:matching-search-not-groups:odd:selected, +.main-table .table-row-cell:matching-search-not-groups:odd:focused, +.main-table .table-row-cell:matching-search-not-groups:odd:focused:hover, +.main-table .table-row-cell:matching-search-not-groups:focused:hover { + -fx-background-color: -jr-selected; +} +.main-table .table-row-cell:matching-search-not-groups:odd:hover { + -fx-background-color: -jr-hover; +} + +.main-table .table-row-cell:matching-groups-not-search { + -fx-background-color: -jr-match-3-even; +} +.main-table .table-row-cell:matching-groups-not-search > .table-cell { + -fx-text-fill: -jr-match-3-text-color; +} +.main-table .table-row-cell:matching-groups-not-search:focused > .table-cell { + -fx-text-fill: -fx-focused-text-base-color; +} +.main-table .table-row-cell:matching-groups-not-search:focused:hover > .table-cell { + -fx-text-fill: -jr-maintable-focused-hover-text; +} +.main-table .table-row-cell:matching-groups-not-search:focused:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-maintable-focused-hover-text; +} +.main-table .table-row-cell:matching-groups-not-search:hover > .table-cell { + -fx-text-fill: -jr-hover-text; +} +.main-table .table-row-cell:matching-groups-not-search > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-match-3-text-color; +} +.main-table .table-row-cell:matching-groups-not-search:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-hover-text; +} +.main-table .table-row-cell:matching-groups-not-search:odd { + -fx-background-color: -jr-match-3-odd; +} +.main-table .table-row-cell:matching-groups-not-search:odd:selected, +.main-table .table-row-cell:matching-groups-not-search:odd:focused, +.main-table .table-row-cell:matching-groups-not-search:odd:focused:hover, +.main-table .table-row-cell:matching-groups-not-search:focused:hover { + -fx-background-color: -jr-selected; +} +.main-table .table-row-cell:matching-groups-not-search:odd:hover { + -fx-background-color: -jr-hover; +} + +.main-table .table-row-cell:not-matching-search-and-groups { + -fx-background-color: -jr-match-4-even; +} +.main-table .table-row-cell:not-matching-search-and-groups > .table-cell { + -fx-text-fill: -jr-match-4-text-color; +} +.main-table .table-row-cell:not-matching-search-and-groups:focused > .table-cell { + -fx-text-fill: -fx-focused-text-base-color; +} +.main-table .table-row-cell:not-matching-search-and-groups:focused:hover > .table-cell { + -fx-text-fill: -jr-maintable-focused-hover-text; +} +.main-table .table-row-cell:not-matching-search-and-groups:focused:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-maintable-focused-hover-text; +} +.main-table .table-row-cell:not-matching-search-and-groups:hover > .table-cell { + -fx-text-fill: -jr-hover-text; +} +.main-table .table-row-cell:not-matching-search-and-groups > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-match-4-text-color; +} +.main-table.table-row-cell:not-matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-hover-text; +} +.main-table .table-row-cell:not-matching-search-and-groups:odd { + -fx-background-color: -jr-match-4-odd; +} +.main-table .table-row-cell:not-matching-search-and-groups:odd:selected, +.main-table .table-row-cell:not-matching-search-and-groups:odd:focused, +.main-table .table-row-cell:not-matching-search-and-groups:odd:focused:hover, +.main-table .table-row-cell:not-matching-search-and-groups:focused:hover { + -fx-background-color: -jr-selected; +} +.main-table .table-row-cell:not-matching-search-and-groups:odd:hover { + -fx-background-color: -jr-hover; +} .rating > .container { -fx-spacing: 2; From e8ef455b7ed14fff80a9ffe039ea7646241a7f42 Mon Sep 17 00:00:00 2001 From: nicholas Date: Tue, 15 Oct 2024 18:36:32 +1100 Subject: [PATCH 3/4] Improved the look of highlight in dark mode --- src/main/java/org/jabref/gui/Dark.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/Dark.css b/src/main/java/org/jabref/gui/Dark.css index 06bec9e65e7..37e4f587a5d 100644 --- a/src/main/java/org/jabref/gui/Dark.css +++ b/src/main/java/org/jabref/gui/Dark.css @@ -56,7 +56,7 @@ -jr-tooltip-fg: derive(-fx-light-text-color, 50%); - -jr-drag-target: -jr-accent; + -jr-drag-target: derive(-jr-accent, 80%); -jr-drag-target-hover: -jr-accent; -js-summary-text-color: derive(-fx-light-text-color, 70%); From cc73d03e78c0142cc56bc4561856a657130cd608 Mon Sep 17 00:00:00 2001 From: nicholas Date: Tue, 15 Oct 2024 18:49:53 +1100 Subject: [PATCH 4/4] fixed the issue where highlight only worked on odd rows --- src/main/java/org/jabref/gui/Base.css | 144 -------------------------- 1 file changed, 144 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index aa646506a75..36b947b0c3d 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -1563,150 +1563,6 @@ We want to have a look that matches our icons in the tool-bar */ /** even and odd are swapped around somehow. Below "odd" matches lines 2, 4, ... **/ -.main-table .table-row-cell:matching-search-and-groups > .table-cell { - -fx-text-fill: -jr-match-1-text-color; -} -.main-table .table-row-cell:matching-search-and-groups:focused > .table-cell { - -fx-text-fill: -fx-focused-text-base-color; -} -.main-table .table-row-cell:matching-search-and-groups:focused:hover > .table-cell { - -fx-text-fill: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-search-and-groups:focused:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-search-and-groups:hover > .table-cell { - -fx-text-fill: -jr-hover-text; -} -.main-table .table-row-cell:matching-search-and-groups > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-match-1-text-color; -} -.main-table .table-row-cell:matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-hover-text; -} -.main-table .table-row-cell:matching-search-and-groups:odd { - -fx-background-color: -jr-match-1-odd; -} -.main-table .table-row-cell:matching-search-and-groups:odd:selected, -.main-table .table-row-cell:matching-search-and-groups:odd:focused, -.main-table .table-row-cell:matching-search-and-groups:odd:focused:hover, -.main-table .table-row-cell:matching-search-and-groups:focused:hover { - -fx-background-color: -jr-selected; -} -.main-table .table-row-cell:matching-search-and-groups:odd:hover { - -fx-background-color: -jr-hover; -} - -.main-table .table-row-cell:matching-search-not-groups { - -fx-background-color: -jr-match-2-even; -} -.main-table .table-row-cell:matching-search-not-groups > .table-cell { - -fx-text-fill: -jr-match-2-text-color; -} -.main-table .table-row-cell:matching-search-not-groups:focused > .table-cell { - -fx-text-fill: -fx-focused-text-base-color; -} -.main-table .table-row-cell:matching-search-not-groups:focused:hover > .table-cell { - -fx-text-fill: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-search-not-groups:focused:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-search-not-groups:hover > .table-cell { - -fx-text-fill: -jr-hover-text; -} -.main-table .table-row-cell:matching-search-not-groups > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-match-2-text-color; -} -.main-table .table-row-cell:matching-search-not-groups:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-hover-text; -} -.main-table .table-row-cell:matching-search-not-groups:odd { - -fx-background-color: -jr-match-2-odd; -} -.main-table .table-row-cell:matching-search-not-groups:odd:selected, -.main-table .table-row-cell:matching-search-not-groups:odd:focused, -.main-table .table-row-cell:matching-search-not-groups:odd:focused:hover, -.main-table .table-row-cell:matching-search-not-groups:focused:hover { - -fx-background-color: -jr-selected; -} -.main-table .table-row-cell:matching-search-not-groups:odd:hover { - -fx-background-color: -jr-hover; -} - -.main-table .table-row-cell:matching-groups-not-search { - -fx-background-color: -jr-match-3-even; -} -.main-table .table-row-cell:matching-groups-not-search > .table-cell { - -fx-text-fill: -jr-match-3-text-color; -} -.main-table .table-row-cell:matching-groups-not-search:focused > .table-cell { - -fx-text-fill: -fx-focused-text-base-color; -} -.main-table .table-row-cell:matching-groups-not-search:focused:hover > .table-cell { - -fx-text-fill: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-groups-not-search:focused:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:matching-groups-not-search:hover > .table-cell { - -fx-text-fill: -jr-hover-text; -} -.main-table .table-row-cell:matching-groups-not-search > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-match-3-text-color; -} -.main-table .table-row-cell:matching-groups-not-search:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-hover-text; -} -.main-table .table-row-cell:matching-groups-not-search:odd { - -fx-background-color: -jr-match-3-odd; -} -.main-table .table-row-cell:matching-groups-not-search:odd:selected, -.main-table .table-row-cell:matching-groups-not-search:odd:focused, -.main-table .table-row-cell:matching-groups-not-search:odd:focused:hover, -.main-table .table-row-cell:matching-groups-not-search:focused:hover { - -fx-background-color: -jr-selected; -} -.main-table .table-row-cell:matching-groups-not-search:odd:hover { - -fx-background-color: -jr-hover; -} - -.main-table .table-row-cell:not-matching-search-and-groups { - -fx-background-color: -jr-match-4-even; -} -.main-table .table-row-cell:not-matching-search-and-groups > .table-cell { - -fx-text-fill: -jr-match-4-text-color; -} -.main-table .table-row-cell:not-matching-search-and-groups:focused > .table-cell { - -fx-text-fill: -fx-focused-text-base-color; -} -.main-table .table-row-cell:not-matching-search-and-groups:focused:hover > .table-cell { - -fx-text-fill: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:not-matching-search-and-groups:focused:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-maintable-focused-hover-text; -} -.main-table .table-row-cell:not-matching-search-and-groups:hover > .table-cell { - -fx-text-fill: -jr-hover-text; -} -.main-table .table-row-cell:not-matching-search-and-groups > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-match-4-text-color; -} -.main-table.table-row-cell:not-matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { - -fx-icon-color: -jr-hover-text; -} -.main-table .table-row-cell:not-matching-search-and-groups:odd { - -fx-background-color: -jr-match-4-odd; -} -.main-table .table-row-cell:not-matching-search-and-groups:odd:selected, -.main-table .table-row-cell:not-matching-search-and-groups:odd:focused, -.main-table .table-row-cell:not-matching-search-and-groups:odd:focused:hover, -.main-table .table-row-cell:not-matching-search-and-groups:focused:hover { - -fx-background-color: -jr-selected; -} -.main-table .table-row-cell:not-matching-search-and-groups:odd:hover { - -fx-background-color: -jr-hover; -} .rating > .container { -fx-spacing: 2;