From e76568c2f10cda7edb604f68c2e5581fd837f5ee Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 4 May 2022 05:04:53 +0300 Subject: [PATCH] - some changes to the dark mode stylesheet to make it look better - darkened the text color for the dark theme in order to make it easier on the eyes - in Distance Plugin, when using the big cursor, the cursor colors are fixed to work for the dark mode too --- CHANGELOG.md | 6 ++++++ appGUI/GUIElements.py | 2 ++ appGUI/themes/dark_style_sheet.py | 14 ++++---------- appPlugins/ToolDistance.py | 13 ++++++++++--- defaults.py | 4 ++-- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b6501a3..3693e177 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ CHANGELOG for FlatCAM Evo beta ================================================= +4.05.2020 + +- some changes to the dark mode stylesheet to make it look better +- darkened the text color for the dark theme in order to make it easier on the eyes +- in Distance Plugin, when using the big cursor, the cursor colors are fixed to work for the dark mode too + 2.05.2022 - in Excellon Editor, Copy sub-tool, added UI and ability to copy as array diff --git a/appGUI/GUIElements.py b/appGUI/GUIElements.py index bf39890d..8f9b5a88 100644 --- a/appGUI/GUIElements.py +++ b/appGUI/GUIElements.py @@ -5819,7 +5819,9 @@ class FCMessageBox(QtWidgets.QMessageBox): super(FCMessageBox, self).__init__(*args, **kwargs) self.offset = None self.moving = None + self.setWindowFlags(self.windowFlags() | Qt.WindowType.FramelessWindowHint | Qt.WindowType.WindowSystemMenuHint) + # self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground) # "background-color: palette(base); " self.setStyleSheet( diff --git a/appGUI/themes/dark_style_sheet.py b/appGUI/themes/dark_style_sheet.py index 47250b47..3d956529 100644 --- a/appGUI/themes/dark_style_sheet.py +++ b/appGUI/themes/dark_style_sheet.py @@ -29,7 +29,7 @@ QToolBar * { } QWidget { background-color: rgba(32.000, 33.000, 36.000, 1.000); - color: rgba(228.000, 231.000, 235.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); } @@ -153,7 +153,6 @@ QGroupBox::title { QMenuBar { background-color: rgba(32.000, 33.000, 36.000, 1.000); padding: 2px; - border-bottom: 1px solid rgba(63.000, 64.000, 66.000, 1.000); } QMenuBar::item { background: transparent; @@ -171,10 +170,10 @@ QMenuBar::item:pressed { } QToolBar { background-color: rgba(41.000, 42.000, 45.000, 1.000); - padding: 0px; + padding: 1x; font-weight: bold; spacing: 1px; - margin: 0px; + margin: 1px; } QToolBar::handle:horizontal { width: 10px; @@ -549,11 +548,7 @@ QDockWidget::float-button:hover { background-color: rgba(30.000, 43.000, 60.000, 1.000); border-radius: 2px } -QFrame { - border: 1px solid rgba(63.000, 64.000, 66.000, 1.000); - padding: 1px; - border-radius: 4px; -} + QLCDNumber { color: rgba(228.000, 231.000, 235.000, 1.000); min-width: 2em; @@ -585,7 +580,6 @@ QSplitter { border: none; } QSplitter::handle { - background-color: rgba(63.000, 64.000, 66.000, 1.000); margin: 1px 3px; } QSplitter::handle:hover { diff --git a/appPlugins/ToolDistance.py b/appPlugins/ToolDistance.py index a7f4ec28..5f99e2ad 100644 --- a/appPlugins/ToolDistance.py +++ b/appPlugins/ToolDistance.py @@ -217,10 +217,17 @@ class Distance(AppTool): if self.ui.big_cursor_cb.get_value(): self.app.on_cursor_type(val="big", control_cursor=True) self.cursor_color_memory = self.app.plotcanvas.cursor_color - if self.app.use_3d_engine is True: - self.app.plotcanvas.cursor_color = '#000000FF' + + if self.app.options["global_theme"] in ['defaul', 'light']: + if self.app.use_3d_engine is True: + self.app.plotcanvas.cursor_color = '#000000FF' + else: + self.app.plotcanvas.cursor_color = '#000000' else: - self.app.plotcanvas.cursor_color = '#000000' + if self.app.use_3d_engine is True: + self.app.plotcanvas.cursor_color = '#AAAAAAFF' + else: + self.app.plotcanvas.cursor_color = '#AAAAAA' self.app.app_cursor.enabled = True self.app.call_source = 'measurement' diff --git a/defaults.py b/defaults.py index 202400f8..075954d2 100644 --- a/defaults.py +++ b/defaults.py @@ -130,8 +130,8 @@ class AppDefaults: # Project Items colors "global_proj_item_color_light": '#000000FF', "global_proj_item_dis_color_light": '#b7b7cbFF', - "global_proj_item_color_dark": '#F2F2F2FF', - "global_proj_item_dis_color_dark": '#a6a6a6ff', + "global_proj_item_color_dark": '#AAAAAAFF', + "global_proj_item_dis_color_dark": '#697177FF', "global_project_autohide": True,