Quote:
Originally Posted by kovidgoyal
Look in gui2/__init__.py
where QApplication is constructed and pass it the path to stylesheet with -stylesheet.
|
Well.. I see I need to use this:
https://doc.qt.io/qt-6/qapplication....tyleSheet-prop
Now how/where would I insert the path to a stylesheet in gui2/__init__.py?
In trying to guess, I found this in line 1090:
Code:
class Application(QApplication):
shutdown_signal_received = pyqtSignal()
palette_changed = pyqtSignal()
def __init__(self, args=(), force_calibre_style=False, override_program_name=None, headless=False, color_prefs=gprefs, windows_app_uid=None):
then I tried this:
Code:
[...]color_prefs=gprefs, windows_app_uid=None, stylesheet=c:\x.qss):
Program wouldn't load... Then tried running "calibre.exe -stylesheet c:\x.qss", no good either
Also, looking in
https://doc.qt.io/qt-6/stylesheet-syntax.html I'm not sure if the file should have .qss or .css extension. First thing I'd like to test is using a wildcard as in:
Code:
* -webkit-scrollbar-thumb {
background-color: blue; /* color of the scroll thumb */
border-radius: 20px; /* roundness of the scroll thumb */
border: 3px solid orange; /* creates padding around scroll thumb */
}
(reference:
https://www.digitalocean.com/communi...css-scrollbars