Skip to content

Commit

Permalink
Fix selected items foreground color on dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
uninhm committed Dec 29, 2020
1 parent 9fc339d commit d0e2560
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion res/style/dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ QPushButton {
border-radius: 4px; }

QListWidget, QTreeWidget, QTextEdit {
background-color: #121212; }
background-color: #121212;
selection-color: #ffffff; }
QListWidget::item::selected, QTreeWidget::item::selected, QTextEdit::item::selected {
color: #ffffff; }
QListWidget QHeaderView, QTreeWidget QHeaderView, QTextEdit QHeaderView {
background-color: #181818;
color: #b3b3b3; }
Expand Down
8 changes: 8 additions & 0 deletions res/style/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ $input-secondary-background-color: #b2b2b2;
$foreground-color: #f5f5f5;
// Color of selected items etc.
$highlight-color: $secondary-background-color;
// Font color of selected items etc.
$highlight-foreground-color: #ffffff;
// Main Spotify green color
$theme-color: #1db954;
// Color for disabled text etc.
Expand Down Expand Up @@ -76,6 +78,12 @@ QPushButton {
QListWidget, QTreeWidget, QTextEdit {
background-color: $background-color;

// Both selection-color and &::item::selected{color} are needed for different OS
selection-color: $highlight-foreground-color;
&::item::selected {
color: $highlight-foreground-color;
}

QHeaderView {
background-color: $header-background-color;
color: $sidebar-foreground-color;
Expand Down

0 comments on commit d0e2560

Please sign in to comment.