Skip to content

Commit

Permalink
Merge pull request #4230 from cd2357/table-rows-alternate-colors
Browse files Browse the repository at this point in the history
More readable tables and lists: Alternate row background colors
  • Loading branch information
sqrrm authored Jun 4, 2020
2 parents bd39f05 + c7ccc43 commit 06d6953
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 49 deletions.
50 changes: 50 additions & 0 deletions desktop/src/main/java/bisq/desktop/bisq.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
49 changes: 0 additions & 49 deletions desktop/src/main/java/bisq/desktop/theme-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 06d6953

Please sign in to comment.