From ee61a9f83d767f0d8c66f663a527651e2a3e2955 Mon Sep 17 00:00:00 2001 From: Loay Ghreeb Date: Mon, 5 Aug 2024 16:20:50 +0300 Subject: [PATCH 01/12] Update Base.css --- src/main/java/org/jabref/gui/Base.css | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index 409b582b5fb..7e5a286d69e 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -649,15 +649,27 @@ TextFlow > .tooltip-text-monospaced { } .table-row-cell:matching-search-and-groups { - -fx-background-color: white; + -fx-background-color: #FFFFFFFF; +} + +.table-row-cell:matching-search-and-groups:odd { + -fx-background-color: #F5F5F5FF; } .table-row-cell:matching-search-not-groups { - -fx-background-color: rgba(180, 180, 180, 0.86); + -fx-background-color: #B4B4B4DB; +} + +.table-row-cell:matching-search-not-groups:odd { + -fx-background-color: #AAAAAADB; } .table-row-cell:matching-groups-not-search { - -fx-background-color: rgba(140, 140, 140, 0.86); + -fx-background-color: #8C8C8CDB; +} + +.table-row-cell:matching-groups-not-search:odd { + -fx-background-color: #828282DB; } .table-row-cell:not-matching-search-and-groups { From 089a22b70a4bdc9bcf240fdc32d9ca3881d70b89 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 5 Aug 2024 17:59:25 +0200 Subject: [PATCH 02/12] Reorder a bit -fill before -text-fill --- src/main/java/org/jabref/gui/Base.css | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index 7e5a286d69e..f0d74c3f144 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -32,6 +32,12 @@ -jr-gray-3: #404040; -jr-black: #000; + /* Some blueish greys - currently not used */ + -jr-blue-gray-1: #c8d6e5; + -jr-blue-gray-2: #8395a7; + -jr-blue-gray-3: #576574; + -jr-blue-gray-4: #222f3e; + /* Highlights */ -jr-blue: #0abde3; -jr-light-blue: #48dbfb; @@ -44,12 +50,6 @@ -jr-yellow: #feca57; -jr-orange: #ff9f43; - /* Some blueish greys */ - -jr-blue-gray-1: #c8d6e5; - -jr-blue-gray-2: #8395a7; - -jr-blue-gray-3: #576574; - -jr-blue-gray-4: #222f3e; - /* Background specs */ -jr-background-alt: -fx-background; -jr-text-area-background: derive(-jr-base, 80%); @@ -584,8 +584,8 @@ TextFlow > .tooltip-text-monospaced { } .tab-pane > .tab-header-area > .headers-region > .tab:selected .glyph-icon { - -fx-text-fill: -fx-mid-text-color; -fx-fill: -fx-mid-text-color; + -fx-text-fill: -fx-mid-text-color; } .tab-pane:focused > .tab-header-area > .headers-region > .tab:selected .focus-indicator { @@ -611,13 +611,13 @@ TextFlow > .tooltip-text-monospaced { .tab-pane > .tab-header-area > .headers-region > .tab .glyph-icon { -glyph-size: 13px; - -fx-text-fill: -fx-mid-text-color; -fx-fill: -fx-mid-text-color; + -fx-text-fill: -fx-mid-text-color; } .tab-pane > .tab-header-area > .headers-region > .tab:selected .glyph-icon { - -fx-text-fill: -jr-theme-text; -fx-fill: -jr-theme-text; + -fx-text-fill: -jr-theme-text; } .tab-pane > .tab-header-area { From 47f9f1d1a388ee455f9dafbc5ec0555b7cd6f703 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 5 Aug 2024 18:00:06 +0200 Subject: [PATCH 03/12] Fix hovering for :odd --- src/main/java/org/jabref/gui/Base.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index f0d74c3f144..6e42bbb79c8 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -677,13 +677,13 @@ TextFlow > .tooltip-text-monospaced { } .table-row-cell:hover, +.table-row-cell:hover:odd, .tree-table-row-cell:hover { -fx-background-color: -jr-hover; -fx-text-fill: -fx-focused-text-base-color; -fx-fill: -fx-focused-text-base-color; } -.table-row-cell:hover, .tree-table-row-cell:selected > .tree-table-cell > .glyph-icon { -fx-fill: white; -fx-text-fill: white; From c02d1c6ec5abc9fe353c8833286524354cc91b59 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 5 Aug 2024 18:01:08 +0200 Subject: [PATCH 04/12] Use -jr-blue-gray-3 colors simple-search-library.bib - Search for "S" - Select group "g" --- src/main/java/org/jabref/gui/Base.css | 66 ++++++------ .../org/jabref/gui/maintable/MainTable.css | 100 ++++++++++++++++++ .../testbib/simple-search-library.bib | 54 ++++++++++ 3 files changed, 188 insertions(+), 32 deletions(-) create mode 100644 src/test/resources/testbib/simple-search-library.bib diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index 6e42bbb79c8..b44512709fd 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -34,9 +34,13 @@ /* Some blueish greys - currently not used */ -jr-blue-gray-1: #c8d6e5; + -jr-blue-gray-1-darker: derive(-jr-blue-gray-1, -5%); -jr-blue-gray-2: #8395a7; + -jr-blue-gray-2-darker: derive(-jr-blue-gray-2, -5%); -jr-blue-gray-3: #576574; + -jr-blue-gray-3-darker: derive(-jr-blue-gray-3, -5%); -jr-blue-gray-4: #222f3e; + -jr-blue-gray-4-darker: derive(-jr-blue-gray-4, -5%); /* Highlights */ -jr-blue: #0abde3; @@ -252,6 +256,34 @@ /* Consistent size for headers of tab-pane and side-panels*/ -jr-header-height: 3em; + + /* region: maintable base colors **/ + + -jr-match-1: -jr-white; + -jr-match-1-odd: derive(-jr-white, -5%); + -jr-match-1-text-color: -fx-mid-text-color; + -jr-match-1-hover: -jr-hover; + -jr-match-1-text-color-hover: -fx-mid-text-color; + + -jr-match-2: -jr-blue-gray-1; + -jr-match-2-odd: -jr-blue-gray-1-darker; + -jr-match-2-text-color: -fx-mid-text-color; + -jr-match-2-hover: -jr-hover; + -jr-match-2-text-color-hover: -fx-mid-text-color; + + -jr-match-3: -jr-blue-gray-3; + -jr-match-3-odd: -jr-blue-gray-3-darker; + -jr-match-3-text-color: -jr-gray-1; + -jr-match-3-hover: -jr-hover; + -jr-match-3-text-color-hover: -fx-mid-text-color; + + -jr-match-4: -jr-blue-gray-4; + -jr-match-4-odd: -jr-blue-gray-4-darker; + -jr-match-4-text-color: -jr-gray-1; + -jr-match-4-hover: -jr-hover; + -jr-match-4-text-color-hover: -fx-mid-text-color; + + /* endregion */ } .unchanged { @@ -270,7 +302,6 @@ -rtfx-background-color: rgba(255, 107, 107, 0.55); } - #frame { -fx-background-color: -jr-background-alt; } @@ -648,34 +679,6 @@ TextFlow > .tooltip-text-monospaced { -fx-padding: 0 .5 0 .5; } -.table-row-cell:matching-search-and-groups { - -fx-background-color: #FFFFFFFF; -} - -.table-row-cell:matching-search-and-groups:odd { - -fx-background-color: #F5F5F5FF; -} - -.table-row-cell:matching-search-not-groups { - -fx-background-color: #B4B4B4DB; -} - -.table-row-cell:matching-search-not-groups:odd { - -fx-background-color: #AAAAAADB; -} - -.table-row-cell:matching-groups-not-search { - -fx-background-color: #8C8C8CDB; -} - -.table-row-cell:matching-groups-not-search:odd { - -fx-background-color: #828282DB; -} - -.table-row-cell:not-matching-search-and-groups { - -fx-opacity: 60%; -} - .table-row-cell:hover, .table-row-cell:hover:odd, .tree-table-row-cell:hover { @@ -1174,12 +1177,11 @@ We want to have a look that matches our icons in the tool-bar */ .table-cell, .tree-table-cell, -.table-cell .glyph-icon, .tree-table-cell .glyph-icon { - -fx-padding: 0.5em 1em 0.5em 1em; -fx-cell-size: 4.0em; - -fx-text-fill: -fx-text-background-color; + -fx-padding: 0.5em 1em 0.5em 1em; -fx-fill: -fx-text-background-color; + -fx-text-fill: -fx-text-background-color; } /* Drag and drop colored indicator */ diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.css b/src/main/java/org/jabref/gui/maintable/MainTable.css index b52b7ef79c8..6f5885f8760 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.css +++ b/src/main/java/org/jabref/gui/maintable/MainTable.css @@ -37,6 +37,106 @@ -fx-padding: -2 0 0 0; } +.table-row-cell:matching-search-and-groups { + -fx-background-color: -jr-match-1; +} +.table-row-cell:matching-search-and-groups:hover { + -fx-background-color: -jr-match-1-hover; +} +.table-row-cell:matching-search-and-groups > .table-cell { + -fx-text-fill: -jr-match-1-text-color; +} +.table-row-cell:matching-search-and-groups:hover > .table-cell { + -fx-text-fill: -jr-match-1-text-color-hover; +} +.table-row-cell:matching-search-and-groups > .table-cell > .ikonli-font-icon { + -fx-text-fill: -jr-match-1-text-color; +} +.table-row-cell:matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { + -fx-text-fill: -jr-match-1-text-color-hover; +} +.table-row-cell:matching-search-and-groups:odd { + -fx-background-color: -jr-match-1-odd; +} +.table-row-cell:matching-search-and-groups:odd:hover { + -fx-background-color: -jr-match-1-hover; +} + +.table-row-cell:matching-search-not-groups { + -fx-background-color: -jr-match-2; +} +.table-row-cell:matching-search-not-groups:hover { + -fx-background-color: -jr-match-2-hover; +} +.table-row-cell:matching-search-not-groups > .table-cell { + -fx-text-fill: -jr-match-2-text-color; +} +.table-row-cell:matching-search-not-groups:hover > .table-cell { + -fx-text-fill: -jr-match-2-text-color-hover; +} +.table-row-cell:matching-search-not-groups > .table-cell > .ikonli-font-icon { + -fx-text-fill: -jr-match-2-text-color; +} +.table-row-cell:matching-search-not-groups:hover > .table-cell > .ikonli-font-icon { + -fx-text-fill: -jr-match-2-text-color-hover; +} +.table-row-cell:matching-search-not-groups:odd { + -fx-background-color: -jr-match-2-odd; +} +.table-row-cell:matching-search-not-groups:odd:hover { + -fx-background-color: -jr-match-2-hover; +} + +.table-row-cell:matching-groups-not-search { + -fx-background-color: -jr-match-3; +} +.table-row-cell:matching-groups-not-search:hover { + -fx-background-color: -jr-match-3-hover; +} +.table-row-cell:matching-groups-not-search > .table-cell { + -fx-text-fill: -jr-match-3-text-color; +} +.table-row-cell:matching-groups-not-search:hover > .table-cell { + -fx-text-fill: -jr-match-3-text-color-hover; +} +.table-row-cell:matching-groups-not-search > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-match-3-text-color; +} +.table-row-cell:matching-groups-not-search:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-match-3-text-color-hover; +} +.table-row-cell:matching-groups-not-search:odd { + -fx-background-color: -jr-match-3-odd; +} +.table-row-cell:matching-groups-not-search:odd:hover { + -fx-background-color: -jr-hover; +} + +.table-row-cell:not-matching-search-and-groups { + -fx-background-color: -jr-match-4; +} +.table-row-cell:not-matching-search-and-groups:hover { + -fx-background-color: -jr-match-4-hover; +} +.table-row-cell:not-matching-search-and-groups > .table-cell { + -fx-text-fill: -jr-match-4-text-color; +} +.table-row-cell:not-matching-search-and-groups:hover > .table-cell { + -fx-text-fill: -jr-match-4-text-color-hover; +} +.table-row-cell:not-matching-search-and-groups > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-match-4-text-color; +} +.table-row-cell:not-matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { + -fx-icon-color: -jr-match-4-text-color-hover; +} +.table-row-cell:not-matching-search-and-groups:odd { + -fx-background-color: -jr-match-4-odd; +} +.table-row-cell:not-matching-search-and-groups:odd:hover { + -fx-background-color: -jr-match-4-hover; +} + .rating > .container { -fx-spacing: 2; } diff --git a/src/test/resources/testbib/simple-search-library.bib b/src/test/resources/testbib/simple-search-library.bib new file mode 100644 index 00000000000..7e85655ee89 --- /dev/null +++ b/src/test/resources/testbib/simple-search-library.bib @@ -0,0 +1,54 @@ +@Article{, + title = {S2}, +} + +@Article{, + title = {g2}, +} + +@Article{, + title = {n}, +} + +@Article{, + title = {Sg}, +} + +@Article{, + title = {Sg3}, +} + +@Article{, + title = {Sg2}, +} + +@Article{, + title = {S}, +} + +@Article{, + title = {S3}, +} + +@Article{, + title = {g}, +} + +@Article{, + title = {g3}, +} + +@Article{, + title = {n}, +} + +@Article{, + title = {n3}, +} + +@Comment{jabref-meta: databaseType:bibtex;} + +@Comment{jabref-meta: grouping: +0 AllEntriesGroup:; +1 SearchGroup:g\;0\;g\;0\;0\;1\;\;\;\;; +} From 4e9cbe955315a9c489fc97aceef28270d2a86d4c Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 5 Aug 2024 22:56:04 +0200 Subject: [PATCH 05/12] Swap odd and even --- src/main/java/org/jabref/gui/Base.css | 10 ++++---- .../org/jabref/gui/maintable/MainTable.css | 24 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index b44512709fd..132ddfaf1a6 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -260,25 +260,25 @@ /* region: maintable base colors **/ -jr-match-1: -jr-white; - -jr-match-1-odd: derive(-jr-white, -5%); + -jr-match-1-even: derive(-jr-white, -5%); -jr-match-1-text-color: -fx-mid-text-color; -jr-match-1-hover: -jr-hover; -jr-match-1-text-color-hover: -fx-mid-text-color; -jr-match-2: -jr-blue-gray-1; - -jr-match-2-odd: -jr-blue-gray-1-darker; + -jr-match-2-even: -jr-blue-gray-1-darker; -jr-match-2-text-color: -fx-mid-text-color; -jr-match-2-hover: -jr-hover; -jr-match-2-text-color-hover: -fx-mid-text-color; -jr-match-3: -jr-blue-gray-3; - -jr-match-3-odd: -jr-blue-gray-3-darker; + -jr-match-3-even: -jr-blue-gray-3-darker; -jr-match-3-text-color: -jr-gray-1; -jr-match-3-hover: -jr-hover; -jr-match-3-text-color-hover: -fx-mid-text-color; -jr-match-4: -jr-blue-gray-4; - -jr-match-4-odd: -jr-blue-gray-4-darker; + -jr-match-4-even: -jr-blue-gray-4-darker; -jr-match-4-text-color: -jr-gray-1; -jr-match-4-hover: -jr-hover; -jr-match-4-text-color-hover: -fx-mid-text-color; @@ -680,7 +680,7 @@ TextFlow > .tooltip-text-monospaced { } .table-row-cell:hover, -.table-row-cell:hover:odd, +.table-row-cell:hover:even, .tree-table-row-cell:hover { -fx-background-color: -jr-hover; -fx-text-fill: -fx-focused-text-base-color; diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.css b/src/main/java/org/jabref/gui/maintable/MainTable.css index 6f5885f8760..20ef0334ed3 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.css +++ b/src/main/java/org/jabref/gui/maintable/MainTable.css @@ -55,10 +55,10 @@ .table-row-cell:matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { -fx-text-fill: -jr-match-1-text-color-hover; } -.table-row-cell:matching-search-and-groups:odd { - -fx-background-color: -jr-match-1-odd; +.table-row-cell:matching-search-and-groups:even { + -fx-background-color: -jr-match-1-even; } -.table-row-cell:matching-search-and-groups:odd:hover { +.table-row-cell:matching-search-and-groups:even:hover { -fx-background-color: -jr-match-1-hover; } @@ -80,10 +80,10 @@ .table-row-cell:matching-search-not-groups:hover > .table-cell > .ikonli-font-icon { -fx-text-fill: -jr-match-2-text-color-hover; } -.table-row-cell:matching-search-not-groups:odd { - -fx-background-color: -jr-match-2-odd; +.table-row-cell:matching-search-not-groups:even { + -fx-background-color: -jr-match-2-even; } -.table-row-cell:matching-search-not-groups:odd:hover { +.table-row-cell:matching-search-not-groups:even:hover { -fx-background-color: -jr-match-2-hover; } @@ -105,10 +105,10 @@ .table-row-cell:matching-groups-not-search:hover > .table-cell > .ikonli-font-icon { -fx-icon-color: -jr-match-3-text-color-hover; } -.table-row-cell:matching-groups-not-search:odd { - -fx-background-color: -jr-match-3-odd; +.table-row-cell:matching-groups-not-search:even { + -fx-background-color: -jr-match-3-even; } -.table-row-cell:matching-groups-not-search:odd:hover { +.table-row-cell:matching-groups-not-search:even:hover { -fx-background-color: -jr-hover; } @@ -130,10 +130,10 @@ .table-row-cell:not-matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { -fx-icon-color: -jr-match-4-text-color-hover; } -.table-row-cell:not-matching-search-and-groups:odd { - -fx-background-color: -jr-match-4-odd; +.table-row-cell:not-matching-search-and-groups:even { + -fx-background-color: -jr-match-4-even; } -.table-row-cell:not-matching-search-and-groups:odd:hover { +.table-row-cell:not-matching-search-and-groups:even:hover { -fx-background-color: -jr-match-4-hover; } From 7eebd3fc31807ebe34dfd5c7aa991d70927b12d7 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 5 Aug 2024 22:59:41 +0200 Subject: [PATCH 06/12] "Fix" derive --- src/main/java/org/jabref/gui/Base.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index 132ddfaf1a6..c9c9d500fea 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -260,7 +260,7 @@ /* region: maintable base colors **/ -jr-match-1: -jr-white; - -jr-match-1-even: derive(-jr-white, -5%); + -jr-match-2-even: derive(-jr-match-1, 5%); -jr-match-1-text-color: -fx-mid-text-color; -jr-match-1-hover: -jr-hover; -jr-match-1-text-color-hover: -fx-mid-text-color; From 7d03684e2f4069df91cf7a640a55c47f50f2880d Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 5 Aug 2024 23:32:58 +0200 Subject: [PATCH 07/12] Proposal for Blueberry-based theme --- src/main/java/org/jabref/gui/Base.css | 16 +++++++------- .../org/jabref/gui/maintable/MainTable.css | 18 ++++++++------- .../testbib/simple-search-library.bib | 22 ++++++++++++++++--- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index c9c9d500fea..bbc49a607de 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -257,28 +257,28 @@ /* Consistent size for headers of tab-pane and side-panels*/ -jr-header-height: 3em; - /* region: maintable base colors **/ + /* region: maintable base colors; based on a Blueberry (#4d648D) diea **/ -jr-match-1: -jr-white; - -jr-match-2-even: derive(-jr-match-1, 5%); + -jr-match-1-even: -jr-base; -jr-match-1-text-color: -fx-mid-text-color; -jr-match-1-hover: -jr-hover; -jr-match-1-text-color-hover: -fx-mid-text-color; - -jr-match-2: -jr-blue-gray-1; - -jr-match-2-even: -jr-blue-gray-1-darker; + -jr-match-2: #d0e1f9ec; /* Periwinkle */ + -jr-match-2-even: derive(-jr-match-2, 10%); -jr-match-2-text-color: -fx-mid-text-color; -jr-match-2-hover: -jr-hover; -jr-match-2-text-color-hover: -fx-mid-text-color; - -jr-match-3: -jr-blue-gray-3; - -jr-match-3-even: -jr-blue-gray-3-darker; + -jr-match-3: #283655; /* Indigo Ink */ + -jr-match-3-even: derive(-jr-match-3, 10%); -jr-match-3-text-color: -jr-gray-1; -jr-match-3-hover: -jr-hover; -jr-match-3-text-color-hover: -fx-mid-text-color; - -jr-match-4: -jr-blue-gray-4; - -jr-match-4-even: -jr-blue-gray-4-darker; + -jr-match-4: #1e1F26; /* Midnight Blue */ + -jr-match-4-even: derive(-jr-match-4, 10%); -jr-match-4-text-color: -jr-gray-1; -jr-match-4-hover: -jr-hover; -jr-match-4-text-color-hover: -fx-mid-text-color; diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.css b/src/main/java/org/jabref/gui/maintable/MainTable.css index 20ef0334ed3..88bb61c09a7 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.css +++ b/src/main/java/org/jabref/gui/maintable/MainTable.css @@ -37,6 +37,8 @@ -fx-padding: -2 0 0 0; } +/** even and odd are swapped around somehow. Below "odd" matches lines 2, 4, ... **/ + .table-row-cell:matching-search-and-groups { -fx-background-color: -jr-match-1; } @@ -55,10 +57,10 @@ .table-row-cell:matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { -fx-text-fill: -jr-match-1-text-color-hover; } -.table-row-cell:matching-search-and-groups:even { +.table-row-cell:matching-search-and-groups:odd { -fx-background-color: -jr-match-1-even; } -.table-row-cell:matching-search-and-groups:even:hover { +.table-row-cell:matching-search-and-groups:odd:hover { -fx-background-color: -jr-match-1-hover; } @@ -80,10 +82,10 @@ .table-row-cell:matching-search-not-groups:hover > .table-cell > .ikonli-font-icon { -fx-text-fill: -jr-match-2-text-color-hover; } -.table-row-cell:matching-search-not-groups:even { +.table-row-cell:matching-search-not-groups:odd { -fx-background-color: -jr-match-2-even; } -.table-row-cell:matching-search-not-groups:even:hover { +.table-row-cell:matching-search-not-groups:odd:hover { -fx-background-color: -jr-match-2-hover; } @@ -105,10 +107,10 @@ .table-row-cell:matching-groups-not-search:hover > .table-cell > .ikonli-font-icon { -fx-icon-color: -jr-match-3-text-color-hover; } -.table-row-cell:matching-groups-not-search:even { +.table-row-cell:matching-groups-not-search:odd { -fx-background-color: -jr-match-3-even; } -.table-row-cell:matching-groups-not-search:even:hover { +.table-row-cell:matching-groups-not-search:odd:hover { -fx-background-color: -jr-hover; } @@ -130,10 +132,10 @@ .table-row-cell:not-matching-search-and-groups:hover > .table-cell > .ikonli-font-icon { -fx-icon-color: -jr-match-4-text-color-hover; } -.table-row-cell:not-matching-search-and-groups:even { +.table-row-cell:not-matching-search-and-groups:odd { -fx-background-color: -jr-match-4-even; } -.table-row-cell:not-matching-search-and-groups:even:hover { +.table-row-cell:not-matching-search-and-groups:odd:hover { -fx-background-color: -jr-match-4-hover; } diff --git a/src/test/resources/testbib/simple-search-library.bib b/src/test/resources/testbib/simple-search-library.bib index 7e85655ee89..9d4d58d4a7c 100644 --- a/src/test/resources/testbib/simple-search-library.bib +++ b/src/test/resources/testbib/simple-search-library.bib @@ -7,7 +7,7 @@ @Article{ } @Article{, - title = {n}, + title = {n4}, } @Article{, @@ -27,7 +27,7 @@ @Article{ } @Article{, - title = {S3}, + title = {S4}, } @Article{, @@ -35,7 +35,7 @@ @Article{ } @Article{, - title = {g3}, + title = {g4}, } @Article{, @@ -46,6 +46,22 @@ @Article{ title = {n3}, } +@Article{, + title = {Sg4}, +} + +@Article{, + title = {S3}, +} + +@Article{, + title = {g3}, +} + +@Article{, + title = {n2}, +} + @Comment{jabref-meta: databaseType:bibtex;} @Comment{jabref-meta: grouping: From 627243199448a7d595adbbd45771b772bdaa47b9 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 5 Aug 2024 23:44:08 +0200 Subject: [PATCH 08/12] Use -jr-theme --- src/main/java/org/jabref/gui/Base.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index bbc49a607de..828574b8ddd 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -265,21 +265,21 @@ -jr-match-1-hover: -jr-hover; -jr-match-1-text-color-hover: -fx-mid-text-color; - -jr-match-2: #d0e1f9ec; /* Periwinkle */ + -jr-match-2: derive(-jr-theme, 100%); -jr-match-2-even: derive(-jr-match-2, 10%); -jr-match-2-text-color: -fx-mid-text-color; -jr-match-2-hover: -jr-hover; -jr-match-2-text-color-hover: -fx-mid-text-color; - -jr-match-3: #283655; /* Indigo Ink */ + -jr-match-3: derive(-jr-theme, 50%); -jr-match-3-even: derive(-jr-match-3, 10%); - -jr-match-3-text-color: -jr-gray-1; + -jr-match-3-text-color: derive(-jr-accent, 30%); -jr-match-3-hover: -jr-hover; -jr-match-3-text-color-hover: -fx-mid-text-color; - -jr-match-4: #1e1F26; /* Midnight Blue */ + -jr-match-4: -jr-theme; -jr-match-4-even: derive(-jr-match-4, 10%); - -jr-match-4-text-color: -jr-gray-1; + -jr-match-4-text-color: -jr-accent; -jr-match-4-hover: -jr-hover; -jr-match-4-text-color-hover: -fx-mid-text-color; From 87cd3bca59b95fb159f07e0a65a59e7a7f1c5fca Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 6 Aug 2024 00:42:27 +0200 Subject: [PATCH 09/12] Remove wrong comment --- src/main/java/org/jabref/gui/Base.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index 828574b8ddd..206e0608257 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -257,7 +257,7 @@ /* Consistent size for headers of tab-pane and side-panels*/ -jr-header-height: 3em; - /* region: maintable base colors; based on a Blueberry (#4d648D) diea **/ + /* region: maintable base colors **/ -jr-match-1: -jr-white; -jr-match-1-even: -jr-base; From e7c0460f1db8d59c1ffffa5fa37449220fdc8973 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 6 Aug 2024 02:04:06 +0200 Subject: [PATCH 10/12] Fix color for focused entry --- src/main/java/org/jabref/gui/maintable/MainTable.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.css b/src/main/java/org/jabref/gui/maintable/MainTable.css index 88bb61c09a7..a906acecc4d 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.css +++ b/src/main/java/org/jabref/gui/maintable/MainTable.css @@ -48,6 +48,9 @@ .table-row-cell:matching-search-and-groups > .table-cell { -fx-text-fill: -jr-match-1-text-color; } +.table-row-cell:matching-search-and-groups:focused > .table-cell { + -fx-text-fill: -fx-focused-text-base-color; +} .table-row-cell:matching-search-and-groups:hover > .table-cell { -fx-text-fill: -jr-match-1-text-color-hover; } @@ -73,6 +76,9 @@ .table-row-cell:matching-search-not-groups > .table-cell { -fx-text-fill: -jr-match-2-text-color; } +.table-row-cell:matching-search-not-groups:focused > .table-cell { + -fx-text-fill: -fx-focused-text-base-color; +} .table-row-cell:matching-search-not-groups:hover > .table-cell { -fx-text-fill: -jr-match-2-text-color-hover; } @@ -98,6 +104,9 @@ .table-row-cell:matching-groups-not-search > .table-cell { -fx-text-fill: -jr-match-3-text-color; } +.table-row-cell:matching-groups-not-search:focused > .table-cell { + -fx-text-fill: -fx-focused-text-base-color; +} .table-row-cell:matching-groups-not-search:hover > .table-cell { -fx-text-fill: -jr-match-3-text-color-hover; } @@ -123,6 +132,9 @@ .table-row-cell:not-matching-search-and-groups > .table-cell { -fx-text-fill: -jr-match-4-text-color; } +.table-row-cell:not-matching-search-and-groups:focused > .table-cell { + -fx-text-fill: -fx-focused-text-base-color; +} .table-row-cell:not-matching-search-and-groups:hover > .table-cell { -fx-text-fill: -jr-match-4-text-color-hover; } From 2ab9b8d5423d9e897659c558d25e8f6179eb7ec6 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 6 Aug 2024 02:11:58 +0200 Subject: [PATCH 11/12] Fix double click behavior --- src/main/java/org/jabref/gui/maintable/MainTable.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.css b/src/main/java/org/jabref/gui/maintable/MainTable.css index a906acecc4d..9dab57bed77 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.css +++ b/src/main/java/org/jabref/gui/maintable/MainTable.css @@ -63,6 +63,9 @@ .table-row-cell:matching-search-and-groups:odd { -fx-background-color: -jr-match-1-even; } +.table-row-cell:matching-search-and-groups:odd:focused { + -fx-background-color: -jr-selected; +} .table-row-cell:matching-search-and-groups:odd:hover { -fx-background-color: -jr-match-1-hover; } @@ -91,6 +94,9 @@ .table-row-cell:matching-search-not-groups:odd { -fx-background-color: -jr-match-2-even; } +.table-row-cell:matching-search-not-groups:odd:focused { + -fx-background-color: -jr-selected; +} .table-row-cell:matching-search-not-groups:odd:hover { -fx-background-color: -jr-match-2-hover; } @@ -119,6 +125,9 @@ .table-row-cell:matching-groups-not-search:odd { -fx-background-color: -jr-match-3-even; } +.table-row-cell:matching-groups-not-search:odd:focused { + -fx-background-color: -jr-selected; +} .table-row-cell:matching-groups-not-search:odd:hover { -fx-background-color: -jr-hover; } @@ -147,6 +156,9 @@ .table-row-cell:not-matching-search-and-groups:odd { -fx-background-color: -jr-match-4-even; } +.table-row-cell:not-matching-search-and-groups:odd:focused { + -fx-background-color: -jr-selected; +} .table-row-cell:not-matching-search-and-groups:odd:hover { -fx-background-color: -jr-match-4-hover; } From 5fe76d877646b01cdc81000aa409a8a16b194c36 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 6 Aug 2024 02:16:57 +0200 Subject: [PATCH 12/12] Final double click fix --- .../java/org/jabref/gui/maintable/MainTable.css | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.css b/src/main/java/org/jabref/gui/maintable/MainTable.css index 9dab57bed77..edb77689301 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.css +++ b/src/main/java/org/jabref/gui/maintable/MainTable.css @@ -63,7 +63,9 @@ .table-row-cell:matching-search-and-groups:odd { -fx-background-color: -jr-match-1-even; } -.table-row-cell:matching-search-and-groups:odd:focused { +.table-row-cell:matching-search-and-groups:odd:focused, +.table-row-cell:matching-search-and-groups:odd:focused:hover, +.table-row-cell:matching-search-and-groups:focused:hover { -fx-background-color: -jr-selected; } .table-row-cell:matching-search-and-groups:odd:hover { @@ -94,7 +96,9 @@ .table-row-cell:matching-search-not-groups:odd { -fx-background-color: -jr-match-2-even; } -.table-row-cell:matching-search-not-groups:odd:focused { +.table-row-cell:matching-search-not-groups:odd:focused, +.table-row-cell:matching-search-not-groups:odd:focused:hover, +.table-row-cell:matching-search-not-groups:focused:hover { -fx-background-color: -jr-selected; } .table-row-cell:matching-search-not-groups:odd:hover { @@ -125,7 +129,9 @@ .table-row-cell:matching-groups-not-search:odd { -fx-background-color: -jr-match-3-even; } -.table-row-cell:matching-groups-not-search:odd:focused { +.table-row-cell:matching-groups-not-search:odd:focused, +.table-row-cell:matching-groups-not-search:odd:focused:hover, +.table-row-cell:matching-groups-not-search:focused:hover { -fx-background-color: -jr-selected; } .table-row-cell:matching-groups-not-search:odd:hover { @@ -156,7 +162,9 @@ .table-row-cell:not-matching-search-and-groups:odd { -fx-background-color: -jr-match-4-even; } -.table-row-cell:not-matching-search-and-groups:odd:focused { +.table-row-cell:not-matching-search-and-groups:odd:focused, +.table-row-cell:not-matching-search-and-groups:odd:focused:hover, +.table-row-cell:not-matching-search-and-groups:focused:hover { -fx-background-color: -jr-selected; } .table-row-cell:not-matching-search-and-groups:odd:hover {