From 8c154e6cc014e6f7c765a936d55c2f00786fb4d8 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sat, 15 Jan 2022 02:53:34 +0200 Subject: [PATCH] - All FCColorEntry GUI element instances have now a set icon for the title (and taskbar) --- CHANGELOG.md | 4 ++++ .../cncjob/CNCJobAdvOptPrefGroupUI.py | 5 +++-- .../preferences/cncjob/CNCJobGenPrefGroupUI.py | 10 +++++----- .../excellon/ExcellonGenPrefGroupUI.py | 6 +++--- .../general/GeneralAPPSetGroupUI.py | 6 +++--- .../general/GeneralGUIPrefGroupUI.py | 18 +++++++++--------- .../geometry/GeometryGenPrefGroupUI.py | 4 ++-- .../preferences/gerber/GerberGenPrefGroupUI.py | 4 ++-- .../tools/Tools2QRCodePrefGroupUI.py | 6 +++--- .../preferences/tools/ToolsFilmPrefGroupUI.py | 4 ++-- 10 files changed, 36 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5014ae32..f9295682 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta ================================================= +15.01.2022 + +- All FCColorEntry GUI element instances have now a set icon for the title (and taskbar) + 14.01.2022 - made sure that new message boxes are always centered on the app UI by setting correctly the parent diff --git a/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py index 88223038..123f73cb 100644 --- a/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py +++ b/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py @@ -1,4 +1,4 @@ -from PyQt6 import QtWidgets +from PyQt6 import QtGui from appGUI.GUIElements import FCSpinner, FCColorEntry, FCLabel, FCGridLayout, FCFrame from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -52,7 +52,8 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI): self.annotation_color_label.setToolTip( _("Set the font color for the annotation texts.") ) - self.annotation_fontcolor_entry = FCColorEntry() + self.annotation_fontcolor_entry = FCColorEntry(icon=QtGui.QIcon( + self.app.resource_location + '/set_colors64.png')) param_grid.addWidget(self.annotation_color_label, 2, 0) param_grid.addWidget(self.annotation_fontcolor_entry, 2, 1) diff --git a/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py index deb6faca..a01b9f36 100644 --- a/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py +++ b/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py @@ -1,4 +1,4 @@ -from PyQt6 import QtWidgets +from PyQt6 import QtGui from appGUI.GUIElements import FCCheckBox, RadioSet, FCSpinner, FCDoubleSpinner, FCSliderWithSpinner, FCColorEntry, \ FCLabel, FCGridLayout, FCFrame @@ -155,7 +155,7 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI): self.tline_color_label.setToolTip( _("Set the travel line color for plotted objects.") ) - self.tline_color_entry = FCColorEntry() + self.tline_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) travel_grid.addWidget(self.tline_color_label, 0, 0) travel_grid.addWidget(self.tline_color_entry, 0, 1) @@ -167,7 +167,7 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI): "First 6 digits are the color and the last 2\n" "digits are for alpha (transparency) level.") ) - self.tfill_color_entry = FCColorEntry() + self.tfill_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) travel_grid.addWidget(self.tfill_color_label, 2, 0) travel_grid.addWidget(self.tfill_color_entry, 2, 1) @@ -204,7 +204,7 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI): self.line_color_label.setToolTip( _("Set the color for plotted objects.") ) - self.line_color_entry = FCColorEntry() + self.line_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) obj_grid.addWidget(self.line_color_label, 0, 0) obj_grid.addWidget(self.line_color_entry, 0, 1) @@ -216,7 +216,7 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI): "First 6 digits are the color and the last 2\n" "digits are for alpha (transparency) level.") ) - self.fill_color_entry = FCColorEntry() + self.fill_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) obj_grid.addWidget(self.fill_color_label, 2, 0) obj_grid.addWidget(self.fill_color_entry, 2, 1) diff --git a/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py index 65455bf1..1dcabafe 100644 --- a/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py +++ b/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py @@ -1,6 +1,6 @@ import platform -from PyQt6 import QtWidgets, QtCore +from PyQt6 import QtWidgets, QtCore, QtGui from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCSliderWithSpinner, FCColorEntry, FCLabel, \ FCGridLayout, FCFrame @@ -305,7 +305,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI): self.line_color_label.setToolTip( _("Set the line color for plotted objects.") ) - self.line_color_entry = FCColorEntry() + self.line_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) obj_grid.addWidget(self.line_color_label, 0, 0) obj_grid.addWidget(self.line_color_entry, 0, 1) @@ -317,7 +317,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI): "First 6 digits are the color and the last 2\n" "digits are for alpha (transparency) level.") ) - self.fill_color_entry = FCColorEntry() + self.fill_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) obj_grid.addWidget(self.fill_color_label, 2, 0) obj_grid.addWidget(self.fill_color_entry, 2, 1) diff --git a/appGUI/preferences/general/GeneralAPPSetGroupUI.py b/appGUI/preferences/general/GeneralAPPSetGroupUI.py index d11ea312..37d969a4 100644 --- a/appGUI/preferences/general/GeneralAPPSetGroupUI.py +++ b/appGUI/preferences/general/GeneralAPPSetGroupUI.py @@ -1,4 +1,4 @@ -from PyQt6 import QtCore, QtWidgets +from PyQt6 import QtCore, QtGui from PyQt6.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, RadioSet, OptionalInputSection, FCSpinner, \ @@ -297,7 +297,7 @@ class GeneralAPPSetGroupUI(OptionsGroupUI): self.axis_color_label.setToolTip( _("Set the color of the screen axis.") ) - self.axis_color_entry = FCColorEntry() + self.axis_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) ax_grid.addWidget(self.axis_color_label, 0, 0) ax_grid.addWidget(self.axis_color_entry, 0, 1) @@ -368,7 +368,7 @@ class GeneralAPPSetGroupUI(OptionsGroupUI): self.mouse_color_label.setToolTip( _("Set the color of the mouse cursor.") ) - self.mouse_cursor_entry = FCColorEntry() + self.mouse_cursor_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) m_grid.addWidget(self.mouse_color_label, 8, 0) m_grid.addWidget(self.mouse_cursor_entry, 8, 1) diff --git a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py index 927b0537..4fbc7d9c 100644 --- a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py +++ b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py @@ -1,4 +1,4 @@ -from PyQt6 import QtWidgets, QtCore +from PyQt6 import QtWidgets, QtCore, QtGui from PyQt6.QtCore import QSettings from appGUI.GUIElements import RadioSet, FCCheckBox, FCComboBox, FCSliderWithSpinner, FCColorEntry, FCLabel, \ @@ -149,7 +149,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): self.sl_color_label.setToolTip( _("Set the line color for the 'left to right' selection box.") ) - self.sl_color_entry = FCColorEntry() + self.sl_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid1.addWidget(self.sl_color_label, 2, 0) grid1.addWidget(self.sl_color_entry, 2, 1) @@ -161,7 +161,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): "First 6 digits are the color and the last 2\n" "digits are for alpha (transparency) level.") ) - self.sf_color_entry = FCColorEntry() + self.sf_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid1.addWidget(self.sf_color_label, 4, 0) grid1.addWidget(self.sf_color_entry, 4, 1) @@ -190,7 +190,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): self.alt_sl_color_label.setToolTip( _("Set the line color for the 'right to left' selection box.") ) - self.alt_sl_color_entry = FCColorEntry() + self.alt_sl_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid1.addWidget(self.alt_sl_color_label, 12, 0) grid1.addWidget(self.alt_sl_color_entry, 12, 1) @@ -203,7 +203,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): "First 6 digits are the color and the last 2\n" "digits are for alpha (transparency) level.") ) - self.alt_sf_color_entry = FCColorEntry() + self.alt_sf_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid1.addWidget(self.alt_sf_color_label, 14, 0) grid1.addWidget(self.alt_sf_color_entry, 14, 1) @@ -235,7 +235,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): self.alt_sf_color_label.setToolTip( _("Set the color for the shape.") ) - self.draw_color_entry = FCColorEntry() + self.draw_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid1.addWidget(self.draw_color_label, 22, 0) grid1.addWidget(self.draw_color_entry, 22, 1) @@ -245,7 +245,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): self.sel_draw_color_label.setToolTip( _("Set the color of the shape when selected.") ) - self.sel_draw_color_entry = FCColorEntry() + self.sel_draw_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid1.addWidget(self.sel_draw_color_label, 24, 0) grid1.addWidget(self.sel_draw_color_entry, 24, 1) @@ -267,7 +267,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): self.proj_color_label.setToolTip( _("Set the color of the items in Project Tab Tree.") ) - self.proj_color_entry = FCColorEntry() + self.proj_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid1.addWidget(self.proj_color_label, 30, 0) grid1.addWidget(self.proj_color_entry, 30, 1) @@ -277,7 +277,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): _("Set the color of the items in Project Tab Tree,\n" "for the case when the items are disabled.") ) - self.proj_color_dis_entry = FCColorEntry() + self.proj_color_dis_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid1.addWidget(self.proj_color_dis_label, 32, 0) grid1.addWidget(self.proj_color_dis_entry, 32, 1) diff --git a/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py b/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py index acf41e44..e9df9163 100644 --- a/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py +++ b/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py @@ -1,4 +1,4 @@ -from PyQt6 import QtWidgets +from PyQt6 import QtGui from appGUI.GUIElements import FCCheckBox, FCSpinner, FCColorEntry, RadioSet, FCLabel, FCGridLayout, FCFrame from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -152,7 +152,7 @@ class GeometryGenPrefGroupUI(OptionsGroupUI): self.line_color_label.setToolTip( _("Set the line color for plotted objects.") ) - self.line_color_entry = FCColorEntry() + self.line_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) obj_grid.addWidget(self.line_color_label, 0, 0) obj_grid.addWidget(self.line_color_entry, 0, 1) diff --git a/appGUI/preferences/gerber/GerberGenPrefGroupUI.py b/appGUI/preferences/gerber/GerberGenPrefGroupUI.py index f3c9ba1d..3df74850 100644 --- a/appGUI/preferences/gerber/GerberGenPrefGroupUI.py +++ b/appGUI/preferences/gerber/GerberGenPrefGroupUI.py @@ -228,7 +228,7 @@ class GerberGenPrefGroupUI(OptionsGroupUI): self.line_color_label.setToolTip( _("Set the line color for plotted objects.") ) - self.line_color_entry = FCColorEntry() + self.line_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) obj_grid.addWidget(self.line_color_label, 0, 0) obj_grid.addWidget(self.line_color_entry, 0, 1, 1, 2) @@ -240,7 +240,7 @@ class GerberGenPrefGroupUI(OptionsGroupUI): "First 6 digits are the color and the last 2\n" "digits are for alpha (transparency) level.") ) - self.fill_color_entry = FCColorEntry() + self.fill_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) obj_grid.addWidget(self.fill_color_label, 2, 0) obj_grid.addWidget(self.fill_color_entry, 2, 1, 1, 2) diff --git a/appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py b/appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py index 26ccc682..43a61c57 100644 --- a/appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py @@ -1,4 +1,4 @@ -from PyQt6 import QtWidgets +from PyQt6 import QtGui from appGUI.GUIElements import FCSpinner, RadioSet, FCTextArea, FCLabel, FCColorEntry, FCGridLayout, FCFrame from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -150,7 +150,7 @@ class Tools2QRCodePrefGroupUI(OptionsGroupUI): self.fill_color_label.setToolTip( _("Set the QRCode fill color (squares color).") ) - self.fill_color_entry = FCColorEntry() + self.fill_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) param_grid.addWidget(self.fill_color_label, 16, 0) param_grid.addWidget(self.fill_color_entry, 16, 1) @@ -160,7 +160,7 @@ class Tools2QRCodePrefGroupUI(OptionsGroupUI): self.back_color_label.setToolTip( _("Set the QRCode background color.") ) - self.back_color_entry = FCColorEntry() + self.back_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) param_grid.addWidget(self.back_color_label, 18, 0) param_grid.addWidget(self.back_color_entry, 18, 1) diff --git a/appGUI/preferences/tools/ToolsFilmPrefGroupUI.py b/appGUI/preferences/tools/ToolsFilmPrefGroupUI.py index 0d19aa26..eb0a3474 100644 --- a/appGUI/preferences/tools/ToolsFilmPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsFilmPrefGroupUI.py @@ -1,4 +1,4 @@ -from PyQt6 import QtWidgets +from PyQt6 import QtGui from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox, FCColorEntry, FCLabel, FCSpinner, \ FCGridLayout, FCComboBox2, FCFrame @@ -222,7 +222,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI): self.film_color_label.setToolTip( _("Set the film color when positive film is selected.") ) - self.film_color_entry = FCColorEntry() + self.film_color_entry = FCColorEntry(icon=QtGui.QIcon(self.app.resource_location + '/set_colors64.png')) grid_par.addWidget(self.film_color_label, 6, 0) grid_par.addWidget(self.film_color_entry, 6, 1)