mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Prevent use of system Qt style on linux as it causes hangs/crashes
This commit is contained in:
parent
a22b5e10fe
commit
0d690f3225
@ -1077,6 +1077,10 @@ class Application(QApplication):
|
||||
def setup_styles(self, force_calibre_style):
|
||||
self.using_calibre_style = force_calibre_style or 'CALIBRE_IGNORE_SYSTEM_THEME' in os.environ or (
|
||||
gprefs['ui_style'] != 'system')
|
||||
if not iswindows and not isosx:
|
||||
# Force calibre style on linux as the system style causes
|
||||
# crashes/hangs in Qt
|
||||
self.using_calibre_style = True
|
||||
if self.using_calibre_style:
|
||||
self.load_calibre_style()
|
||||
|
||||
|
@ -20,7 +20,7 @@ from PyQt5.Qt import (
|
||||
|
||||
from calibre import human_readable
|
||||
from calibre.ebooks.metadata.book.render import DEFAULT_AUTHOR_LINK
|
||||
from calibre.constants import isosx
|
||||
from calibre.constants import isosx, iswindows
|
||||
from calibre.ebooks.metadata.sources.prefs import msprefs
|
||||
from calibre.gui2 import default_author_link
|
||||
from calibre.gui2.dialogs.template_dialog import TemplateDialog
|
||||
@ -325,6 +325,10 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
|
||||
def genesis(self, gui):
|
||||
self.gui = gui
|
||||
if not isosx and not iswindows:
|
||||
self.label_widget_style.setVisible(False)
|
||||
self.opt_ui_style.setVisible(False)
|
||||
|
||||
db = gui.library_view.model().db
|
||||
|
||||
r = self.register
|
||||
|
Loading…
x
Reference in New Issue
Block a user