Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate maintable.css to base css #11881

Merged
merged 5 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We improved the performance when pasting and importing entries in an existing library. [#11843](https://github.com/JabRef/jabref/pull/11843)
- When fulltext search is selected but indexing is deactivated, a dialog is now shown asking if the user wants to enable indexing now [#9491](https://github.com/JabRef/jabref/issues/9491)
- We changed instances of 'Search Selected' to 'Search Pre-configured' in Web Search Preferences UI. [#11871](https://github.com/JabRef/jabref/pull/11871)
- We added a new CSS style class `main-table` for the main table. [#11881](https://github.com/JabRef/jabref/pull/11881)

### Fixed

Expand Down
218 changes: 217 additions & 1 deletion src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ TextFlow > .hyperlink:visited,
-fx-underline: true;
}


.glyph-icon {
/* This adjusts text alignment within the bounds of text nodes so that
the text is always vertically centered within the bounds. Based on
Expand Down Expand Up @@ -1517,4 +1516,221 @@ We want to have a look that matches our icons in the tool-bar */
-fx-background-color: transparent;
}

/* endregion */

/* region: maintable css */


.main-table .column-icon {
-fx-alignment: baseline-center;
-fx-padding: 0;
}

.main-table .column-header.column-icon > .label {
-fx-padding: 0;
-fx-alignment: baseline-center;
}

.main-table .empty-special-field {
visibility: hidden;
}

.main-table .table-row-cell:hover .empty-special-field {
visibility: visible;
-fx-icon-color: -jr-gray-2;
-fx-fill: -jr-gray-2;
}

.main-table .table-row-cell:dragOver-bottom {
-fx-border-color: -jr-drag-target;
-fx-border-width: 0 0 2 0;
-fx-padding: 0 0 -2 0;
}

.main-table .table-row-cell:dragOver-center {
-fx-border-color: -jr-drag-target;
-fx-border-width: 1 1 1 1;
-fx-padding: -1 -1 -1 -1;
-fx-background-color: -jr-drag-target-hover;
}

.main-table .table-row-cell:dragOver-top {
-fx-border-color: -jr-drag-target;
-fx-border-width: 2 0 0 0;
-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;
}

.rating > .container > .button {
-fx-pref-width: 16;
-fx-pref-height: 10;
-fx-background-repeat: no-repeat no-repeat;
-fx-background-size: 16 16;
-fx-border-style: none;
-fx-border-width: 0;
-fx-padding: 0;
}

.rating > .container > .button.strong {

}

.rating > .container > .button:hover {
-fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.6), 8, 0.0, 0, 0);
}


/* endregion */
Loading