- added a hack so the dark stylesheet for QWidget is reapplied if that Qwidget is removed (I don't know why it is lost in the first time)
This commit is contained in:
@@ -12,6 +12,7 @@ CHANGELOG for FlatCAM Evo beta
|
|||||||
- changed the activity GIF's for the dark theme
|
- changed the activity GIF's for the dark theme
|
||||||
- changed some of the dark theme icons to the red color
|
- changed some of the dark theme icons to the red color
|
||||||
- made sure that the draw color in Editors is inverted for the dark mode
|
- made sure that the draw color in Editors is inverted for the dark mode
|
||||||
|
- added a hack so the dark stylesheet for QWidget is reapplied if that Qwidget is removed (I don't know why it is lost in the first time)
|
||||||
|
|
||||||
4.05.2020
|
4.05.2020
|
||||||
|
|
||||||
|
|||||||
41
appTool.py
41
appTool.py
@@ -114,6 +114,47 @@ class AppTool(QtWidgets.QWidget):
|
|||||||
# Put ourselves in the appGUI
|
# Put ourselves in the appGUI
|
||||||
self.app.ui.plugin_scroll_area.setWidget(self)
|
self.app.ui.plugin_scroll_area.setWidget(self)
|
||||||
|
|
||||||
|
# TODO Hack, should find the root cause and fix
|
||||||
|
# for whatever reason the stylesheet for dark mode is lost at some point here, so we should reapply it for the
|
||||||
|
# QWidget
|
||||||
|
if self.app.options['global_theme'] not in ['default', 'light']:
|
||||||
|
self.setStyleSheet(
|
||||||
|
'''
|
||||||
|
QWidget {
|
||||||
|
background-color: rgba(32.000, 33.000, 36.000, 1.000);
|
||||||
|
color: rgba(170.000, 170.000, 170.000, 1.000);
|
||||||
|
selection-background-color: rgba(138.000, 180.000, 247.000, 1.000);
|
||||||
|
selection-color: rgba(32.000, 33.000, 36.000, 1.000);
|
||||||
|
}
|
||||||
|
QWidget:disabled {
|
||||||
|
color: rgba(105.000, 113.000, 119.000, 1.000);
|
||||||
|
selection-background-color: rgba(83.000, 87.000, 91.000, 1.000);
|
||||||
|
selection-color: rgba(105.000, 113.000, 119.000, 1.000);
|
||||||
|
}
|
||||||
|
QWidget {
|
||||||
|
backward-icon: url(${path}/themes/dark/svg/arrow_upward__icon-foreground__rotate-270.svg);
|
||||||
|
forward-icon: url(${path}/themes/dark/svg/arrow_upward__icon-foreground__rotate-90.svg);
|
||||||
|
leftarrow-icon: url(${path}/themes/dark/svg/arrow_upward__icon-foreground__rotate-270.svg);
|
||||||
|
rightarrow-icon: url(${path}/themes/dark/svg/arrow_upward__icon-foreground__rotate-90.svg);
|
||||||
|
dialog-ok-icon: url(${path}/themes/dark/svg/check__icon-foreground.svg);
|
||||||
|
dialog-cancel-icon: url(${path}/themes/dark/svg/close__icon-foreground.svg);
|
||||||
|
dialog-yes-icon: url(${path}/themes/dark/svg/check_circle__icon-foreground.svg);
|
||||||
|
dialog-no-icon: url(${path}/themes/dark/svg/cancel__icon-foreground.svg);
|
||||||
|
dialog-apply-icon: url(${path}/themes/dark/svg/check__icon-foreground.svg);
|
||||||
|
dialog-reset-icon: url(${path}/themes/dark/svg/restart_alt__icon-foreground.svg);
|
||||||
|
dialog-save-icon: url(${path}/themes/dark/svg/save__icon-foreground.svg);
|
||||||
|
dialog-discard-icon: url(${path}/themes/dark/svg/delete__icon-foreground.svg);
|
||||||
|
dialog-close-icon: url(${path}/themes/dark/svg/close__icon-foreground.svg);
|
||||||
|
dialog-open-icon: url(${path}/themes/dark/svg/folder_open__icon-foreground.svg);
|
||||||
|
dialog-help-icon: url(${path}/themes/dark/svg/help__icon-foreground.svg);
|
||||||
|
filedialog-parent-directory-icon: url(${path}/themes/dark/svg/arrow_upward__icon-foreground.svg);
|
||||||
|
filedialog-new-directory-icon: url(${path}/themes/dark/svg/create_new_folder__icon-foreground.svg);
|
||||||
|
titlebar-close-icon: url(${path}/themes/dark/svg/close__icon-foreground.svg);
|
||||||
|
titlebar-normal-icon: url(${path}/themes/dark/svg/flip_to_front__icon-foreground.svg);
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
)
|
||||||
|
|
||||||
# Switch notebook to tool page
|
# Switch notebook to tool page
|
||||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
|
self.app.ui.notebook.setCurrentWidget(self.app.ui.plugin_tab)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user