mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 22:55:46 +01:00
Fix for dark theme on Windows 11 (#930)
This commit is contained in:
parent
2dbe80f537
commit
c6d19b0eaf
1 changed files with 116 additions and 0 deletions
116
buzz/widgets/application.py
Normal file → Executable file
116
buzz/widgets/application.py
Normal file → Executable file
|
|
@ -51,6 +51,122 @@ class Application(QApplication):
|
|||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue