Skip to content

Commit

Permalink
Merge pull request #11598 from JabRef/fix-row-color
Browse files Browse the repository at this point in the history
Fix row coloring (again)
  • Loading branch information
Siedlerchr authored Aug 7, 2024
2 parents 6c3cd64 + 878a2f2 commit 37d8119
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -262,20 +262,20 @@

/* region: maintable base colors **/

-jr-match-1: -jr-row-odd-background;
-jr-match-1-odd: -jr-row-odd-background;
-jr-match-1-even: -jr-row-even-background;
-jr-match-1-text-color: -fx-mid-text-color;

-jr-match-2: derive(-jr-theme, 100%);
-jr-match-2-even: derive(-jr-match-2, 10%);
-jr-match-2-odd: derive(-jr-theme, 100%);
-jr-match-2-even: derive(-jr-match-2-odd, 10%);
-jr-match-2-text-color: -fx-mid-text-color;

-jr-match-3: derive(-jr-theme, 50%);
-jr-match-3-even: derive(-jr-match-3, 10%);
-jr-match-3-odd: derive(-jr-theme, 50%);
-jr-match-3-even: derive(-jr-match-3-odd, 10%);
-jr-match-3-text-color: derive(-jr-accent, 30%);

-jr-match-4: -jr-theme;
-jr-match-4-even: derive(-jr-match-4, 10%);
-jr-match-4-odd: -jr-theme;
-jr-match-4-even: derive(-jr-match-4-odd, 10%);
-jr-match-4-text-color: -jr-accent;

-jr-maintable-focused-hover-text: -jr-white;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/jabref/gui/Dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@
-js-summary-text-color: derive(-fx-light-text-color, 70%);
-js-summary-text-color-selected: derive( -fx-dark-text-color, 70%);

-jr-match-1: -jr-row-odd-background;
-jr-match-1-odd: -jr-row-odd-background;
-jr-match-1-even: -jr-row-even-background;
-jr-match-1-text-color: -fx-mid-text-color;

-jr-match-2: derive(-jr-theme, -60%);
-jr-match-2-odd: derive(-jr-theme, -60%);
-jr-match-2-even: derive(-jr-match-2, 4%);
-jr-match-2-text-color: -fx-mid-text-color;

-jr-match-3: derive(-jr-theme, -70%);
-jr-match-3-odd: derive(-jr-theme, -70%);
-jr-match-3-even: derive(-jr-match-3, 4%);
-jr-match-3-text-color: derive(-jr-accent, 30%);

-jr-match-4: derive(-jr-black, 10%);
-jr-match-4-odd: derive(-jr-black, 10%);
-jr-match-4-even: -jr-background-alt;
-jr-match-4-text-color: derive(-jr-match-3-text-color, -15%);
}
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/jabref/gui/maintable/MainTable.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/** 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;
-fx-background-color: -jr-match-1-even;
}
.table-row-cell:matching-search-and-groups > .table-cell {
-fx-text-fill: -jr-match-1-text-color;
Expand All @@ -64,7 +64,7 @@
-fx-icon-color: -jr-hover-text;
}
.table-row-cell:matching-search-and-groups:odd {
-fx-background-color: -jr-match-1-even;
-fx-background-color: -jr-match-1-odd;
}
.table-row-cell:matching-search-and-groups:odd:selected,
.table-row-cell:matching-search-and-groups:odd:focused,
Expand All @@ -77,7 +77,7 @@
}

.table-row-cell:matching-search-not-groups {
-fx-background-color: -jr-match-2;
-fx-background-color: -jr-match-2-even;
}
.table-row-cell:matching-search-not-groups > .table-cell {
-fx-text-fill: -jr-match-2-text-color;
Expand All @@ -101,7 +101,7 @@
-fx-icon-color: -jr-hover-text;
}
.table-row-cell:matching-search-not-groups:odd {
-fx-background-color: -jr-match-2-even;
-fx-background-color: -jr-match-2-odd;
}
.table-row-cell:matching-search-not-groups:odd:selected,
.table-row-cell:matching-search-not-groups:odd:focused,
Expand All @@ -114,7 +114,7 @@
}

.table-row-cell:matching-groups-not-search {
-fx-background-color: -jr-match-3;
-fx-background-color: -jr-match-3-even;
}
.table-row-cell:matching-groups-not-search > .table-cell {
-fx-text-fill: -jr-match-3-text-color;
Expand All @@ -138,7 +138,7 @@
-fx-icon-color: -jr-hover-text;
}
.table-row-cell:matching-groups-not-search:odd {
-fx-background-color: -jr-match-3-even;
-fx-background-color: -jr-match-3-odd;
}
.table-row-cell:matching-groups-not-search:odd:selected,
.table-row-cell:matching-groups-not-search:odd:focused,
Expand All @@ -151,7 +151,7 @@
}

.table-row-cell:not-matching-search-and-groups {
-fx-background-color: -jr-match-4;
-fx-background-color: -jr-match-4-even;
}
.table-row-cell:not-matching-search-and-groups > .table-cell {
-fx-text-fill: -jr-match-4-text-color;
Expand All @@ -175,7 +175,7 @@
-fx-icon-color: -jr-hover-text;
}
.table-row-cell:not-matching-search-and-groups:odd {
-fx-background-color: -jr-match-4-even;
-fx-background-color: -jr-match-4-odd;
}
.table-row-cell:not-matching-search-and-groups:odd:selected,
.table-row-cell:not-matching-search-and-groups:odd:focused,
Expand Down

0 comments on commit 37d8119

Please sign in to comment.