Skip to content

Commit

Permalink
fix: change selection background color for language list
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhd1701 committed Jul 14, 2022
1 parent f5d675e commit 704dd98
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gridplayer/widgets/language_list.py
@@ -1,4 +1,5 @@
from PyQt5.QtCore import QSize, Qt
from PyQt5.QtGui import QPalette
from PyQt5.QtSvg import QSvgWidget
from PyQt5.QtWidgets import (
QHBoxLayout,
Expand Down Expand Up @@ -70,6 +71,12 @@ class LanguageList(QListWidget):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

bg_color = QPalette().color(QPalette.Base).name()

self.setStyleSheet(
f"QListWidget::item:selected {{background-color: {bg_color};}}"
)

self.currentItemChanged.connect(self._set_language_checkmark)

def add_language_row(self, lang_id, lang):
Expand Down

0 comments on commit 704dd98

Please sign in to comment.