Merge pull request #4230 from cd2357/table-rows-alternate-colors

More readable tables and lists: Alternate row background colors
This commit is contained in:
sqrrm 2020-06-04 13:12:09 +02:00 committed by GitHub
commit 06d6953a22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 49 deletions

View file

@ -237,6 +237,30 @@
-fx-background-color: -fx-selection-bar;
}
/* list view */
.list-view .list-cell {
-fx-background-color: -bs-background-color;
}
.list-view .list-cell:odd {
-fx-background-color: derive(-bs-background-color, -5%);
}
.list-view .list-cell:even {
-fx-background-color: derive(-bs-background-color, 5%);
}
.list-view .list-cell:hover,
.list-view .list-cell:selected,
.table-view .table-cell:hover,
.table-view .table-cell:selected {
-fx-background: -fx-accent;
-fx-background-color: -fx-selection-bar;
-fx-border-color: -fx-selection-bar;
}
.number-column.table-cell {
-fx-background-color: -bs-background-color;
}
.list-view:focused,
.tree-view:focused,
.table-view:focused,
@ -867,6 +891,32 @@ textfield */
* Table *
* *
******************************************************************************/
.table-view .table-row-cell:even .table-cell {
-fx-background-color: derive(-bs-background-color, 5%);
-fx-border-color: derive(-bs-background-color,5%);
}
.table-view .table-row-cell:odd .table-cell {
-fx-background-color: derive(-bs-background-color,-5%);
-fx-border-color: derive(-bs-background-color,-5%);
}
.table-view .table-row-cell:hover .table-cell,
.table-view .table-row-cell:selected .table-cell {
-fx-background: -fx-accent;
-fx-background-color: -fx-selection-bar;
-fx-border-color: -fx-selection-bar;
}
.table-row-cell {
-fx-border-color: -bs-background-color;
}
.table-row-cell:empty, .table-row-cell:empty:even, .table-row-cell:empty:odd {
-fx-background-color: -bs-background-color;
-fx-min-height: 36;
}
.offer-table .table-row-cell {
-fx-background: -fx-accent;
-fx-background-color: -bs-color-gray-6;
}
.table-view .table-cell {
-fx-alignment: center-left;
-fx-padding: 2 0 2 0;

View file

@ -135,55 +135,6 @@
-bs-chart-dao-line2: -bs-color-blue-2;
}
/* list view */
.list-view .list-cell {
-fx-background-color: -bs-background-color;
}
.list-view .list-cell:odd {
-fx-background-color: derive(-bs-background-color, -5%);
}
.list-view .list-cell:even {
-fx-background-color: derive(-bs-background-color, 5%);
}
.list-view .list-cell:selected,
.table-view .table-cell:selected {
-fx-background: -fx-accent;
-fx-background-color: -fx-selection-bar;
-fx-border-color: -fx-selection-bar;
}
.number-column.table-cell {
-fx-background-color: -bs-background-color;
}
/* table view */
.table-view, .table-cell:focused, .table-row-cell {
-fx-background: transparent;
}
.table-view .table-row-cell:even .table-cell {
-fx-background-color: derive(-bs-background-color, 5%);
-fx-border-color: derive(-bs-background-color,5%);
}
.table-view .table-row-cell:odd .table-cell {
-fx-background-color: derive(-bs-background-color,-5%);
-fx-border-color: derive(-bs-background-color,-5%);
}
.table-view .table-row-cell:selected .table-cell {
-fx-background: -fx-accent;
-fx-background-color: -fx-selection-bar;
-fx-border-color: -fx-selection-bar;
}
.table-row-cell {
-fx-border-color: -bs-background-color;
}
.table-row-cell:empty, .table-row-cell:empty:even, .table-row-cell:empty:odd {
-fx-background-color: -bs-background-color;
-fx-min-height: 36;
}
.offer-table .table-row-cell {
-fx-background: -fx-accent;
-fx-background-color: -bs-color-gray-6;
}
/* tab pane */
.jfx-tab-pane .tab-content-area {