- All FCColorEntry GUI element instances have now a set icon for the title (and taskbar)

This commit is contained in:
Marius Stanciu
2022-01-15 02:53:34 +02:00
committed by Marius
parent b615edd631
commit 8c154e6cc0
10 changed files with 36 additions and 31 deletions

View File

@@ -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 14.01.2022
- made sure that new message boxes are always centered on the app UI by setting correctly the parent - made sure that new message boxes are always centered on the app UI by setting correctly the parent

View File

@@ -1,4 +1,4 @@
from PyQt6 import QtWidgets from PyQt6 import QtGui
from appGUI.GUIElements import FCSpinner, FCColorEntry, FCLabel, FCGridLayout, FCFrame from appGUI.GUIElements import FCSpinner, FCColorEntry, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
@@ -52,7 +52,8 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
self.annotation_color_label.setToolTip( self.annotation_color_label.setToolTip(
_("Set the font color for the annotation texts.") _("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_color_label, 2, 0)
param_grid.addWidget(self.annotation_fontcolor_entry, 2, 1) param_grid.addWidget(self.annotation_fontcolor_entry, 2, 1)

View File

@@ -1,4 +1,4 @@
from PyQt6 import QtWidgets from PyQt6 import QtGui
from appGUI.GUIElements import FCCheckBox, RadioSet, FCSpinner, FCDoubleSpinner, FCSliderWithSpinner, FCColorEntry, \ from appGUI.GUIElements import FCCheckBox, RadioSet, FCSpinner, FCDoubleSpinner, FCSliderWithSpinner, FCColorEntry, \
FCLabel, FCGridLayout, FCFrame FCLabel, FCGridLayout, FCFrame
@@ -155,7 +155,7 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
self.tline_color_label.setToolTip( self.tline_color_label.setToolTip(
_("Set the travel line color for plotted objects.") _("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_label, 0, 0)
travel_grid.addWidget(self.tline_color_entry, 0, 1) 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" "First 6 digits are the color and the last 2\n"
"digits are for alpha (transparency) level.") "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_label, 2, 0)
travel_grid.addWidget(self.tfill_color_entry, 2, 1) travel_grid.addWidget(self.tfill_color_entry, 2, 1)
@@ -204,7 +204,7 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
self.line_color_label.setToolTip( self.line_color_label.setToolTip(
_("Set the color for plotted objects.") _("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_label, 0, 0)
obj_grid.addWidget(self.line_color_entry, 0, 1) 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" "First 6 digits are the color and the last 2\n"
"digits are for alpha (transparency) level.") "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_label, 2, 0)
obj_grid.addWidget(self.fill_color_entry, 2, 1) obj_grid.addWidget(self.fill_color_entry, 2, 1)

View File

@@ -1,6 +1,6 @@
import platform import platform
from PyQt6 import QtWidgets, QtCore from PyQt6 import QtWidgets, QtCore, QtGui
from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCSliderWithSpinner, FCColorEntry, FCLabel, \ from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCSliderWithSpinner, FCColorEntry, FCLabel, \
FCGridLayout, FCFrame FCGridLayout, FCFrame
@@ -305,7 +305,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
self.line_color_label.setToolTip( self.line_color_label.setToolTip(
_("Set the line color for plotted objects.") _("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_label, 0, 0)
obj_grid.addWidget(self.line_color_entry, 0, 1) 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" "First 6 digits are the color and the last 2\n"
"digits are for alpha (transparency) level.") "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_label, 2, 0)
obj_grid.addWidget(self.fill_color_entry, 2, 1) obj_grid.addWidget(self.fill_color_entry, 2, 1)

View File

@@ -1,4 +1,4 @@
from PyQt6 import QtCore, QtWidgets from PyQt6 import QtCore, QtGui
from PyQt6.QtCore import QSettings from PyQt6.QtCore import QSettings
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, RadioSet, OptionalInputSection, FCSpinner, \ from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, RadioSet, OptionalInputSection, FCSpinner, \
@@ -297,7 +297,7 @@ class GeneralAPPSetGroupUI(OptionsGroupUI):
self.axis_color_label.setToolTip( self.axis_color_label.setToolTip(
_("Set the color of the screen axis.") _("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_label, 0, 0)
ax_grid.addWidget(self.axis_color_entry, 0, 1) ax_grid.addWidget(self.axis_color_entry, 0, 1)
@@ -368,7 +368,7 @@ class GeneralAPPSetGroupUI(OptionsGroupUI):
self.mouse_color_label.setToolTip( self.mouse_color_label.setToolTip(
_("Set the color of the mouse cursor.") _("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_color_label, 8, 0)
m_grid.addWidget(self.mouse_cursor_entry, 8, 1) m_grid.addWidget(self.mouse_cursor_entry, 8, 1)

View File

@@ -1,4 +1,4 @@
from PyQt6 import QtWidgets, QtCore from PyQt6 import QtWidgets, QtCore, QtGui
from PyQt6.QtCore import QSettings from PyQt6.QtCore import QSettings
from appGUI.GUIElements import RadioSet, FCCheckBox, FCComboBox, FCSliderWithSpinner, FCColorEntry, FCLabel, \ from appGUI.GUIElements import RadioSet, FCCheckBox, FCComboBox, FCSliderWithSpinner, FCColorEntry, FCLabel, \
@@ -149,7 +149,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
self.sl_color_label.setToolTip( self.sl_color_label.setToolTip(
_("Set the line color for the 'left to right' selection box.") _("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_label, 2, 0)
grid1.addWidget(self.sl_color_entry, 2, 1) 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" "First 6 digits are the color and the last 2\n"
"digits are for alpha (transparency) level.") "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_label, 4, 0)
grid1.addWidget(self.sf_color_entry, 4, 1) grid1.addWidget(self.sf_color_entry, 4, 1)
@@ -190,7 +190,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
self.alt_sl_color_label.setToolTip( self.alt_sl_color_label.setToolTip(
_("Set the line color for the 'right to left' selection box.") _("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_label, 12, 0)
grid1.addWidget(self.alt_sl_color_entry, 12, 1) 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" "First 6 digits are the color and the last 2\n"
"digits are for alpha (transparency) level.") "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_label, 14, 0)
grid1.addWidget(self.alt_sf_color_entry, 14, 1) grid1.addWidget(self.alt_sf_color_entry, 14, 1)
@@ -235,7 +235,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
self.alt_sf_color_label.setToolTip( self.alt_sf_color_label.setToolTip(
_("Set the color for the shape.") _("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_label, 22, 0)
grid1.addWidget(self.draw_color_entry, 22, 1) grid1.addWidget(self.draw_color_entry, 22, 1)
@@ -245,7 +245,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
self.sel_draw_color_label.setToolTip( self.sel_draw_color_label.setToolTip(
_("Set the color of the shape when selected.") _("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_label, 24, 0)
grid1.addWidget(self.sel_draw_color_entry, 24, 1) grid1.addWidget(self.sel_draw_color_entry, 24, 1)
@@ -267,7 +267,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI):
self.proj_color_label.setToolTip( self.proj_color_label.setToolTip(
_("Set the color of the items in Project Tab Tree.") _("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_label, 30, 0)
grid1.addWidget(self.proj_color_entry, 30, 1) 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" _("Set the color of the items in Project Tab Tree,\n"
"for the case when the items are disabled.") "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_label, 32, 0)
grid1.addWidget(self.proj_color_dis_entry, 32, 1) grid1.addWidget(self.proj_color_dis_entry, 32, 1)

View File

@@ -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.GUIElements import FCCheckBox, FCSpinner, FCColorEntry, RadioSet, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
@@ -152,7 +152,7 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
self.line_color_label.setToolTip( self.line_color_label.setToolTip(
_("Set the line color for plotted objects.") _("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_label, 0, 0)
obj_grid.addWidget(self.line_color_entry, 0, 1) obj_grid.addWidget(self.line_color_entry, 0, 1)

View File

@@ -228,7 +228,7 @@ class GerberGenPrefGroupUI(OptionsGroupUI):
self.line_color_label.setToolTip( self.line_color_label.setToolTip(
_("Set the line color for plotted objects.") _("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_label, 0, 0)
obj_grid.addWidget(self.line_color_entry, 0, 1, 1, 2) 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" "First 6 digits are the color and the last 2\n"
"digits are for alpha (transparency) level.") "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_label, 2, 0)
obj_grid.addWidget(self.fill_color_entry, 2, 1, 1, 2) obj_grid.addWidget(self.fill_color_entry, 2, 1, 1, 2)

View File

@@ -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.GUIElements import FCSpinner, RadioSet, FCTextArea, FCLabel, FCColorEntry, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
@@ -150,7 +150,7 @@ class Tools2QRCodePrefGroupUI(OptionsGroupUI):
self.fill_color_label.setToolTip( self.fill_color_label.setToolTip(
_("Set the QRCode fill color (squares color).") _("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_label, 16, 0)
param_grid.addWidget(self.fill_color_entry, 16, 1) param_grid.addWidget(self.fill_color_entry, 16, 1)
@@ -160,7 +160,7 @@ class Tools2QRCodePrefGroupUI(OptionsGroupUI):
self.back_color_label.setToolTip( self.back_color_label.setToolTip(
_("Set the QRCode background color.") _("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_label, 18, 0)
param_grid.addWidget(self.back_color_entry, 18, 1) param_grid.addWidget(self.back_color_entry, 18, 1)

View File

@@ -1,4 +1,4 @@
from PyQt6 import QtWidgets from PyQt6 import QtGui
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox, FCColorEntry, FCLabel, FCSpinner, \ from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox, FCColorEntry, FCLabel, FCSpinner, \
FCGridLayout, FCComboBox2, FCFrame FCGridLayout, FCComboBox2, FCFrame
@@ -222,7 +222,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
self.film_color_label.setToolTip( self.film_color_label.setToolTip(
_("Set the film color when positive film is selected.") _("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_label, 6, 0)
grid_par.addWidget(self.film_color_entry, 6, 1) grid_par.addWidget(self.film_color_entry, 6, 1)