mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
Older pyqt versions don't have is_dark_theme
This commit is contained in:
parent
f99810a1ca
commit
1c0d7f93f7
2 changed files with 4 additions and 2 deletions
|
|
@ -1532,7 +1532,8 @@ class ViewLog(SizePersistedDialog):
|
||||||
error_msg=error_msg[:200]+" ..."
|
error_msg=error_msg[:200]+" ..."
|
||||||
label = QLabel('%s: %s'%(lineno, error_msg))
|
label = QLabel('%s: %s'%(lineno, error_msg))
|
||||||
label.setWordWrap(True)
|
label.setWordWrap(True)
|
||||||
if QApplication.instance().is_dark_theme:
|
if( hasattr(QApplication.instance(),'is_dark_theme')
|
||||||
|
and QApplication.instance().is_dark_theme ):
|
||||||
label.setStyleSheet("QLabel { margin-left: 2em; color : aqua; } QLabel:hover { color: red; }");
|
label.setStyleSheet("QLabel { margin-left: 2em; color : aqua; } QLabel:hover { color: red; }");
|
||||||
else:
|
else:
|
||||||
label.setStyleSheet("QLabel { margin-left: 2em; color : blue; } QLabel:hover { color: red; }");
|
label.setStyleSheet("QLabel { margin-left: 2em; color : blue; } QLabel:hover { color: red; }");
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,8 @@ class IniHighlighter(QSyntaxHighlighter):
|
||||||
'comments':Qt.darkYellow
|
'comments':Qt.darkYellow
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
if QApplication.instance().is_dark_theme:
|
if( hasattr(QApplication.instance(),'is_dark_theme')
|
||||||
|
and QApplication.instance().is_dark_theme ):
|
||||||
colors = {
|
colors = {
|
||||||
'knownentries':Qt.green,
|
'knownentries':Qt.green,
|
||||||
'errors':Qt.red,
|
'errors':Qt.red,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue