diff --git a/AppGUI/GUIElements.py b/AppGUI/GUIElements.py index 73415ca1..0cdbabba 100644 --- a/AppGUI/GUIElements.py +++ b/AppGUI/GUIElements.py @@ -689,6 +689,9 @@ class FCColorEntry(QtWidgets.QFrame): super().__init__(**kwargs) self.entry = FCEntry() + regex = QtCore.QRegExp("[#A-Fa-f0-9]*") + validator = QtGui.QRegExpValidator(regex, self.entry) + self.entry.setValidator(validator) self.button = QtWidgets.QPushButton() self.button.setFixedSize(15, 15) diff --git a/AppGUI/preferences/general/GeneralGUIPrefGroupUI.py b/AppGUI/preferences/general/GeneralGUIPrefGroupUI.py index 4b9cb96e..95858750 100644 --- a/AppGUI/preferences/general/GeneralGUIPrefGroupUI.py +++ b/AppGUI/preferences/general/GeneralGUIPrefGroupUI.py @@ -349,12 +349,10 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): # Setting selection colors (left - right) handlers def on_sf_color_entry(self): self.app.defaults['global_sel_fill'] = self.app.defaults['global_sel_fill'][7:9] - self.sf_color_button.setStyleSheet("background-color:%s" % str(self.app.defaults['global_sel_fill'])[:7]) def on_sl_color_entry(self): self.app.defaults['global_sel_line'] = self.sl_color_entry.get_value()[:7] + \ self.app.defaults['global_sel_line'][7:9] - self.sl_color_button.setStyleSheet("background-color:%s" % str(self.app.defaults['global_sel_line'])[:7]) def on_left_right_alpha_changed(self, spinner_value): """ @@ -376,16 +374,10 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): def on_alt_sf_color_entry(self): self.app.defaults['global_alt_sel_fill'] = self.alt_sf_color_entry.get_value()[:7] + \ self.app.defaults['global_alt_sel_fill'][7:9] - self.alt_sf_color_button.setStyleSheet( - "background-color:%s" % str(self.app.defaults['global_alt_sel_fill'])[:7] - ) def on_alt_sl_color_entry(self): self.app.defaults['global_alt_sel_line'] = self.alt_sl_color_entry.get_value()[:7] + \ self.app.defaults['global_alt_sel_line'][7:9] - self.alt_sl_color_button.setStyleSheet( - "background-color:%s" % str(self.app.defaults['global_alt_sel_line'])[:7] - ) def on_right_left_alpha_changed(self, spinner_value): """ @@ -406,22 +398,15 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): # Setting Editor colors def on_draw_color_entry(self): self.app.defaults['global_draw_color'] = self.draw_color_entry.get_value() - self.draw_color_button.setStyleSheet("background-color:%s" % str(self.app.defaults['global_draw_color'])) def on_sel_draw_color_entry(self): self.app.defaults['global_sel_draw_color'] = self.sel_draw_color_entry.get_value() - self.sel_draw_color_button.setStyleSheet( - "background-color:%s" % str(self.app.defaults['global_sel_draw_color'])) def on_proj_color_entry(self): self.app.defaults['global_proj_item_color'] = self.proj_color_entry.get_value() - self.proj_color_button.setStyleSheet( - "background-color:%s" % str(self.app.defaults['global_proj_item_color'])) def on_proj_color_dis_entry(self): self.app.defaults['global_proj_item_dis_color'] = self.proj_color_dis_entry.get_value() - self.proj_color_dis_button.setStyleSheet( - "background-color:%s" % str(self.app.defaults['global_proj_item_dis_color'])) def on_layout(self, index=None, lay=None): """ diff --git a/AppTools/ToolFiducials.py b/AppTools/ToolFiducials.py index 3f020c64..4aa8598a 100644 --- a/AppTools/ToolFiducials.py +++ b/AppTools/ToolFiducials.py @@ -259,7 +259,7 @@ class ToolFiducials(AppTool): self.grb_object_combo.is_last = True self.grb_object_combo.obj_type = "Gerber" - self.grbobj_label = QtWidgets.QLabel("%s:" % _("Copper Gerber")) + self.grbobj_label = QtWidgets.QLabel("%s:" % _("GERBER")) self.grbobj_label.setToolTip( _("Gerber Object to which will be added a copper thieving.") ) diff --git a/AppTools/ToolRulesCheck.py b/AppTools/ToolRulesCheck.py index ee32824c..2761e1a9 100644 --- a/AppTools/ToolRulesCheck.py +++ b/AppTools/ToolRulesCheck.py @@ -58,7 +58,7 @@ class RulesCheck(AppTool): self.grid_layout.setColumnStretch(1, 3) self.grid_layout.setColumnStretch(2, 0) - self.gerber_title_lbl = QtWidgets.QLabel('%s:' % _("Gerber Files")) + self.gerber_title_lbl = QtWidgets.QLabel('%s:' % _("GERBER")) self.gerber_title_lbl.setToolTip( _("Gerber objects for which to check rules.") ) @@ -196,7 +196,7 @@ class RulesCheck(AppTool): self.grid_layout.addWidget(QtWidgets.QLabel(""), 8, 0, 1, 3) - self.excellon_title_lbl = QtWidgets.QLabel('%s:' % _("Excellon Objects")) + self.excellon_title_lbl = QtWidgets.QLabel('%s:' % _("EXCELLON")) self.excellon_title_lbl.setToolTip( _("Excellon objects for which to check rules.") ) diff --git a/AppTools/ToolSub.py b/AppTools/ToolSub.py index 9c5e1457..c2072bfd 100644 --- a/AppTools/ToolSub.py +++ b/AppTools/ToolSub.py @@ -67,7 +67,7 @@ class ToolSub(AppTool): form_layout = QtWidgets.QFormLayout() self.tools_box.addLayout(form_layout) - self.gerber_title = QtWidgets.QLabel("%s" % _("Gerber Objects")) + self.gerber_title = QtWidgets.QLabel("%s" % _("GERBER")) form_layout.addRow(self.gerber_title) # Target Gerber Object @@ -122,7 +122,7 @@ class ToolSub(AppTool): form_geo_layout = QtWidgets.QFormLayout() self.tools_box.addLayout(form_geo_layout) - self.geo_title = QtWidgets.QLabel("%s" % _("Geometry Objects")) + self.geo_title = QtWidgets.QLabel("%s" % _("GEOMETRY")) form_geo_layout.addRow(self.geo_title) # Target Geometry Object diff --git a/App_Main.py b/App_Main.py index e3d6a064..a916605a 100644 --- a/App_Main.py +++ b/App_Main.py @@ -8906,7 +8906,7 @@ class App(QtCore.QObject): """ self.log.debug("Plot_all()") if muted is not True: - self.inform[str, bool].emit('[success] %s...' % _("Redrawing all objects"), False) + self.inform[str, bool].emit('%s...' % _("Redrawing all objects"), False) for plot_obj in self.collection.get_list(): def worker_task(obj): diff --git a/CHANGELOG.md b/CHANGELOG.md index 18e24496..fd455211 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ CHANGELOG for FlatCAM beta - in Preferences replaced the widgets that sets colors with a compound one (from David Robertson) - made Progressive plotting work in Isolation Tool - fix an issue with progressive plotted shapes not being deleted on the end of the job +- some fixed due of recent changes and some strings changed +- added a validator for the FCColorEntry GUI element such that only the valid chars are accepted 31.05.2020