Skip to content

Commit

Permalink
Fix for dark theme on Windows 11 (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus authored Oct 5, 2024
1 parent 2dbe80f commit c6d19b0
Showing 1 changed file with 116 additions and 0 deletions.
116 changes: 116 additions & 0 deletions buzz/widgets/application.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,122 @@ def __init__(self, argv: list) -> None:

self.setPalette(palette)

# For Windows 11
stylesheet = """
QWidget {
background-color: #121212;
color: #ffffff;
}
QPushButton {
background-color: #1e1e1e;
color: #ffffff;
}
QPushButton:hover {
background-color: #2e2e2e;
}
QHeaderView::section {
background-color: #1e1e1e;
color: #ffffff;
font-weight: bold;
}
QToolBar {
border: 1px solid #2e2e2e;
}
QTabBar::tab {
background-color: #1e1e1e;
color: #ffffff;
}
QTabBar::tab:selected {
background-color: #2e2e2e;
}
QLineEdit, QTextEdit, QPlainTextEdit, QSpinBox, QDoubleSpinBox,
QTabWidget::pane, QFormLayout, QHBoxLayout, QVBoxLayout, QTreeWidget,
QTableView, QGroupBox {
border: 1px solid #2e2e2e;
}
QLineEdit:focus, QTextEdit:focus, QPlainTextEdit:focus, QSpinBox:focus, QDoubleSpinBox:focus,
QTabWidget::pane:focus, QFormLayout:focus, QHBoxLayout:focus, QVBoxLayout:focus, QTreeWidget:focus,
QTableView:focus, QGroupBox:focus {
border: 1px solid #4e4e4e;
}
QMenuBar {
background-color: #1e1e1e;
color: #ffffff;
}
QMenuBar::item {
background-color: #1e1e1e;
color: #ffffff;
}
QMenuBar::item:selected {
background-color: #2e2e2e;
}
QMenu::item {
background-color: #1e1e1e;
color: #ffffff;
}
QMenu::item:selected {
background-color: #2e2e2e;
}
QMenu::item:hover {
background-color: #2e2e2e;
}
QToolButton {
background-color: transparent;
min-height: 30px;
min-width: 30px;
}
QToolButton:hover {
background-color: #2e2e2e;
}
QScrollBar:vertical {
background-color: #1e1e1e;
width: 16px;
margin: 16px 0 16px 0;
}
QScrollBar::handle:vertical {
background-color: #2e2e2e;
min-height: 20px;
}
QScrollBar::add-line:vertical {
background-color: #1e1e1e;
height: 16px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line:vertical {
background-color: #1e1e1e;
height: 16px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar:horizontal {
background-color: #1e1e1e;
height: 16px;
margin: 0 16px 0 16px;
}
QScrollBar::handle:horizontal {
background-color: #2e2e2e;
min-width: 20px;
}
QScrollBar::add-line:horizontal {
background-color: #1e1e1e;
width: 16px;
subcontrol-position: right;
subcontrol-origin: margin;
}
QScrollBar::sub-line:horizontal {
background-color: #1e1e1e;
width: 16px;
subcontrol-position: left;
subcontrol-origin: margin;
}
QScrollBar::sub-page:horizontal, QScrollBar::add-page:horizontal,
QScrollBar::sub-page:vertical, QScrollBar::add-page:vertical {
background-color: #1e1e1e;
}
"""
self.setStyleSheet(stylesheet)

db = setup_app_db()
transcription_service = TranscriptionService(
TranscriptionDAO(db), TranscriptionSegmentDAO(db)
Expand Down

0 comments on commit c6d19b0

Please sign in to comment.