From dc636369a66276155d8fb1c1e72a2f97f6350406 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 13 Jan 2022 16:42:59 +0200 Subject: [PATCH] - modified the FCMessageBox to have a border and a single color inside the box --- CHANGELOG.md | 6 +++++- appGUI/GUIElements.py | 9 ++++++++- requirements.txt | 1 + setup_ubuntu.sh | 3 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb13e5b8..2dc06abf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,17 @@ CHANGELOG for FlatCAM beta ================================================= +13.01.2022 + +- modified the FCMessageBox to have a border and a single color inside the box + 12.01.2022 - subclassed the QMessageBox and created a new type of MessageBox that is frameless; started to use it throughout the app 11.01.2022 -- added an initial implementation of a dark theme using the qdarktheme (performance is not great and there are some artifacts); the theme is activated once the gray icons are checked in the Preferences +- added an initial implementation of a dark theme using the pyqtqdarktheme (performance is not great and there are some artifacts); the theme is activated once the gray icons are checked in the Preferences - started to mod the qdarktheme to fit the application 10.01.2022 diff --git a/appGUI/GUIElements.py b/appGUI/GUIElements.py index a96c8d52..4a17090f 100644 --- a/appGUI/GUIElements.py +++ b/appGUI/GUIElements.py @@ -5428,7 +5428,14 @@ class FCMessageBox(QtWidgets.QMessageBox): super(FCMessageBox, self).__init__(*args, **kwargs) self.offset = None self.moving = None - self.setWindowFlags(Qt.WindowType.FramelessWindowHint) + self.setWindowFlags(self.windowFlags() | Qt.WindowType.FramelessWindowHint | Qt.WindowType.WindowSystemMenuHint) + + self.setStyleSheet( + "QDialog { " + "border: 1px solid palette(shadow); " + "background-color: palette(base); " + "}" + ) def mousePressEvent(self, event): if event.button() == Qt.MouseButton.LeftButton: diff --git a/requirements.txt b/requirements.txt index 207e007e..37809140 100644 --- a/requirements.txt +++ b/requirements.txt @@ -40,6 +40,7 @@ pyopengl pyqt6>=6.1.0 freetype-py vispy>=0.9.0 +pyqtdarktheme gdal rasterio \ No newline at end of file diff --git a/setup_ubuntu.sh b/setup_ubuntu.sh index 8c2a9e10..941186b4 100644 --- a/setup_ubuntu.sh +++ b/setup_ubuntu.sh @@ -48,6 +48,7 @@ sudo -H python3 -m pip install --upgrade \ pyserial \ pikepdf \ foronoi \ - ortools + ortools \ + pyqtdarktheme # OR-TOOLS package is now optional # ################################