mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
18 lines
477 B
Python
18 lines
477 B
Python
"""This is used to patch the QApplication style sheet.
|
|
It reads the current stylesheet, appends our modifications and sets the new stylesheet.
|
|
"""
|
|
|
|
from PyQt5 import QtWidgets
|
|
|
|
|
|
def patch_qt_stylesheet(use_dark_theme: bool) -> None:
|
|
if not use_dark_theme:
|
|
return
|
|
|
|
app = QtWidgets.QApplication.instance()
|
|
|
|
style_sheet = app.styleSheet()
|
|
style_sheet = style_sheet + '''
|
|
QAbstractScrollArea { padding: 0px; }
|
|
'''
|
|
app.setStyleSheet(style_sheet)
|