Ver código fonte

Merged marius_stanciu/flatcam_beta/Beta_8.994 into Beta

Marius Stanciu 5 anos atrás
pai
commit
b01037f916

+ 10 - 2
CHANGELOG.md

@@ -7,6 +7,12 @@ CHANGELOG for FlatCAM beta
 
 =================================================
 
+5.11.2020
+
+- fixed the annotation plotting in the CNCJob object
+- created a new InputDialog widget that has the buttons and the context menu translated and replaced the old widget throughout the app
+- updated the translation strings
+
 4.11.2020
 
 - updated all the translation files
@@ -18,6 +24,8 @@ CHANGELOG for FlatCAM beta
 - Turkish language strings updated (by Mehmet Kaya)
 - in Gerber Editor added the shortcut key 'Space' to change the direction of the array of pads
 - updated all the translation languages. Translated by Google the Spanish, Russian. Romanian translation updated.
+- refactored the name of the classes from the Gerber Editor
+- added more icons in the Gerber and Excellon Editors for the buttons
 
 3.11.2020
 
@@ -3372,7 +3380,7 @@ RELEASE 8.993
 
 23.05.2019
 
-- fixed bug in Gerber editor FCDisk and FCSemiDisc that the resulting geometry was not stored into the '0' aperture where all the solids are stored
+- fixed bug in Gerber editor FCDisk and DiscSemiEditorGrb that the resulting geometry was not stored into the '0' aperture where all the solids are stored
 - fixed minor issue in Gerber Editor where apertures were included in the saved object even if there was no geometric data for that aperture
 - some PEP8 cleanup in FlatCAMApp.py
 
@@ -3447,7 +3455,7 @@ RELEASE 8.993
 - made the Feedrate Rapids parameter to depend on the type of preprocessor choosed. It will be showed only for a preprocessor which the name contain 'marlin' and for any preprocessor's that have 'custom' in the name
 - fixed the camlib.Gerber functions of mirror, scale, offset, skew and rotate to work with the new data structure for apertures geometry
 - fixed Gerber Editor selection to work with the new Gerber data structure in self.apertures
-- fixed Gerber Editor FCPad class to work with the new Gerber data structure in self.apertures
+- fixed Gerber Editor PadEditorGrb class to work with the new Gerber data structure in self.apertures
 - fixed camlib.Gerber issues related to what happen after parsing rectangular apertures 
 - wip in camblib.Gerber
 - completely converted the Gerber editor to the new data structure

+ 9 - 4
appEditors/AppExcEditor.py

@@ -3829,6 +3829,8 @@ class AppExcEditorUI:
         self.ui_vertical_lay.addWidget(separator_line)
 
         self.convert_slots_btn = FCButton('%s' % _("Convert Slots"))
+        self.convert_slots_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/convert32.png'))
+
         self.convert_slots_btn.setToolTip(
             _("Convert the slots in the selected tools to drills.")
         )
@@ -3870,7 +3872,8 @@ class AppExcEditorUI:
         hlay.addWidget(self.addtool_entry)
 
         # Tool Diameter Button
-        self.addtool_btn = QtWidgets.QPushButton(_('Add'))
+        self.addtool_btn = FCButton(_('Add'))
+        self.addtool_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
         self.addtool_btn.setToolTip(
             _("Add a new tool to the tool list\n"
               "with the diameter specified above.")
@@ -3881,7 +3884,8 @@ class AppExcEditorUI:
         grid1.addLayout(hlay, 0, 1)
 
         # Delete Tool
-        self.deltool_btn = QtWidgets.QPushButton(_('Delete Tool'))
+        self.deltool_btn = FCButton(_('Delete Tool'))
+        self.deltool_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/trash32.png'))
         self.deltool_btn.setToolTip(
             _("Delete a tool in the tool list\n"
               "by selecting a row in the tool table.")
@@ -3930,7 +3934,8 @@ class AppExcEditorUI:
         hlay2.addWidget(self.resdrill_entry)
 
         # Resize Button
-        self.resize_btn = QtWidgets.QPushButton(_('Resize'))
+        self.resize_btn = FCButton(_('Resize'))
+        self.resize_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/resize16.png'))
         self.resize_btn.setToolTip(
             _("Resize drill(s)")
         )
@@ -4309,7 +4314,7 @@ class AppExcEditorUI:
         layout.addStretch(1)
 
         # Editor
-        self.exit_editor_button = QtWidgets.QPushButton(_('Exit Editor'))
+        self.exit_editor_button = FCButton(_('Exit Editor'))
         self.exit_editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/power16.png'))
         self.exit_editor_button.setToolTip(
             _("Exit from Editor.")

+ 31 - 31
appEditors/AppGeoEditor.py

@@ -17,7 +17,7 @@ from PyQt5.QtCore import Qt
 from camlib import distance, arc, three_point_circle, Geometry, FlatCAMRTreeStorage
 from appTool import AppTool
 from appGUI.GUIElements import OptionalInputSection, FCCheckBox, FCLabel, FCComboBox, FCTextAreaRich, \
-    FCDoubleSpinner, FCButton, FCInputDialog, FCTree, NumericalEvalTupleEntry
+    FCDoubleSpinner, FCButton, FCInputDoubleSpinner, FCTree, NumericalEvalTupleEntry
 from appParsers.ParseFont import *
 
 from shapely.geometry import LineString, LinearRing, MultiLineString, Polygon, MultiPolygon, Point
@@ -1445,12 +1445,12 @@ class TransformEditorTool(AppTool):
                     return
 
     def on_rotate_key(self):
-        val_box = FCInputDialog(title=_("Rotate ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_rotate']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
+        val_box = FCInputDoubleSpinner(title=_("Rotate ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_rotate']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -1463,12 +1463,12 @@ class TransformEditorTool(AppTool):
     def on_offx_key(self):
         units = self.app.defaults['units'].lower()
 
-        val_box = FCInputDialog(title=_("Offset on X axis ..."),
-                                text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
-                                min=-10000.0000, max=10000.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_offset_x']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
+        val_box = FCInputDoubleSpinner(title=_("Offset on X axis ..."),
+                                       text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
+                                       min=-10000.0000, max=10000.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_offset_x']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -1481,12 +1481,12 @@ class TransformEditorTool(AppTool):
     def on_offy_key(self):
         units = self.app.defaults['units'].lower()
 
-        val_box = FCInputDialog(title=_("Offset on Y axis ..."),
-                                text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
-                                min=-10000.0000, max=10000.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_offset_y']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
+        val_box = FCInputDoubleSpinner(title=_("Offset on Y axis ..."),
+                                       text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
+                                       min=-10000.0000, max=10000.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_offset_y']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -1497,12 +1497,12 @@ class TransformEditorTool(AppTool):
             self.app.inform.emit('[success] %s...' % _("Offset on the Y axis canceled"))
 
     def on_skewx_key(self):
-        val_box = FCInputDialog(title=_("Skew on X axis ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_skew_x']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewX.png'))
+        val_box = FCInputDoubleSpinner(title=_("Skew on X axis ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_skew_x']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/skewX.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -1513,12 +1513,12 @@ class TransformEditorTool(AppTool):
             self.app.inform.emit('[success] %s...' % _("Skew on X axis canceled"))
 
     def on_skewy_key(self):
-        val_box = FCInputDialog(title=_("Skew on Y axis ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_skew_y']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewY.png'))
+        val_box = FCInputDoubleSpinner(title=_("Skew on Y axis ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_skew_y']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/skewY.png'))
 
         val, ok = val_box.get_value()
         if ok:

+ 157 - 149
appEditors/AppGerberEditor.py

@@ -18,8 +18,8 @@ from copy import copy, deepcopy
 import logging
 
 from camlib import distance, arc, three_point_circle
-from appGUI.GUIElements import FCEntry, FCComboBox, FCTable, FCDoubleSpinner, FCSpinner, RadioSet, \
-    EvalEntry2, FCInputDialog, FCButton, OptionalInputSection, FCCheckBox, NumericalEvalTupleEntry, FCComboBox2
+from appGUI.GUIElements import FCEntry, FCComboBox, FCTable, FCDoubleSpinner, FCSpinner, RadioSet, EvalEntry2, \
+    FCInputDoubleSpinner, FCButton, OptionalInputSection, FCCheckBox, NumericalEvalTupleEntry, FCComboBox2, FCLabel
 from appTool import AppTool
 
 import numpy as np
@@ -174,7 +174,7 @@ class DrawTool(object):
         return bounds_rec(obj)
 
 
-class FCShapeTool(DrawTool):
+class ShapeToolEditorGrb(DrawTool):
     """
     Abstract class for tools that create a shape.
     """
@@ -187,7 +187,7 @@ class FCShapeTool(DrawTool):
         pass
 
 
-class FCPad(FCShapeTool):
+class PadEditorGrb(ShapeToolEditorGrb):
     """
     Resulting type: Polygon
     """
@@ -383,7 +383,7 @@ class FCPad(FCShapeTool):
         try:
             self.geometry = DrawToolShape(self.util_shape(self.points))
         except Exception as e:
-            log.debug("FCPad.make() --> %s" % str(e))
+            log.debug("PadEditorGrb.make() --> %s" % str(e))
 
         self.draw_app.in_action = False
         self.complete = True
@@ -400,7 +400,7 @@ class FCPad(FCShapeTool):
             pass
 
 
-class FCPadArray(FCShapeTool):
+class PadArrayEditorGrb(ShapeToolEditorGrb):
     """
     Resulting type: MultiPolygon
     """
@@ -779,7 +779,7 @@ class FCPadArray(FCShapeTool):
             pass
 
 
-class FCPoligonize(FCShapeTool):
+class PoligonizeEditorGrb(ShapeToolEditorGrb):
     """
     Resulting type: Polygon
     """
@@ -889,7 +889,7 @@ class FCPoligonize(FCShapeTool):
         self.draw_app.plot_all()
 
 
-class FCRegion(FCShapeTool):
+class RegionEditorGrb(ShapeToolEditorGrb):
     """
     Resulting type: Polygon
     """
@@ -929,7 +929,7 @@ class FCRegion(FCShapeTool):
         try:
             QtGui.QGuiApplication.restoreOverrideCursor()
         except Exception as e:
-            log.debug("AppGerberEditor.FCRegion --> %s" % str(e))
+            log.debug("AppGerberEditor.RegionEditorGrb --> %s" % str(e))
 
         self.cursor = QtGui.QCursor(QtGui.QPixmap(self.draw_app.app.resource_location + '/aero.png'))
         QtGui.QGuiApplication.setOverrideCursor(self.cursor)
@@ -1039,7 +1039,7 @@ class FCRegion(FCShapeTool):
                                                                               join_style=1)
                     return DrawToolUtilityShape(new_geo_el)
                 except Exception as e:
-                    log.debug("AppGerberEditor.FCRegion.utility_geometry() --> %s" % str(e))
+                    log.debug("AppGerberEditor.RegionEditorGrb.utility_geometry() --> %s" % str(e))
             else:
                 new_geo_el['solid'] = Point(self.temp_points).buffer(self.buf_val,
                                                                      resolution=int(self.steps_per_circle / 4))
@@ -1205,7 +1205,7 @@ class FCRegion(FCShapeTool):
             pass
 
 
-class FCTrack(FCShapeTool):
+class TrackEditorGrb(ShapeToolEditorGrb):
     """
     Resulting type: Polygon
     """
@@ -1243,7 +1243,7 @@ class FCTrack(FCShapeTool):
         try:
             QtGui.QGuiApplication.restoreOverrideCursor()
         except Exception as e:
-            log.debug("AppGerberEditor.FCTrack.__init__() --> %s" % str(e))
+            log.debug("AppGerberEditor.TrackEditorGrb.__init__() --> %s" % str(e))
 
         self.cursor = QtGui.QCursor(QtGui.QPixmap(self.draw_app.app.resource_location +
                                                   '/aero_path%s.png' % self.draw_app.bend_mode))
@@ -1394,7 +1394,7 @@ class FCTrack(FCShapeTool):
             try:
                 QtGui.QGuiApplication.restoreOverrideCursor()
             except Exception as e:
-                log.debug("AppGerberEditor.FCTrack.on_key() --> %s" % str(e))
+                log.debug("AppGerberEditor.TrackEditorGrb.on_key() --> %s" % str(e))
 
             if self.draw_app.bend_mode == 1:
                 self.draw_app.bend_mode = 2
@@ -1433,7 +1433,7 @@ class FCTrack(FCShapeTool):
             try:
                 QtGui.QGuiApplication.restoreOverrideCursor()
             except Exception as e:
-                log.debug("AppGerberEditor.FCTrack.on_key() --> %s" % str(e))
+                log.debug("AppGerberEditor.TrackEditorGrb.on_key() --> %s" % str(e))
 
             if self.draw_app.bend_mode == 1:
                 self.draw_app.bend_mode = 5
@@ -1478,7 +1478,7 @@ class FCTrack(FCShapeTool):
             pass
 
 
-class FCDisc(FCShapeTool):
+class DiscEditorGrb(ShapeToolEditorGrb):
     """
     Resulting type: Polygon
     """
@@ -1562,7 +1562,7 @@ class FCDisc(FCShapeTool):
         try:
             QtGui.QGuiApplication.restoreOverrideCursor()
         except Exception as e:
-            log.debug("AppGerberEditor.FCDisc --> %s" % str(e))
+            log.debug("AppGerberEditor.DiscEditorGrb --> %s" % str(e))
 
         self.draw_app.current_storage = self.storage_obj
 
@@ -1591,7 +1591,7 @@ class FCDisc(FCShapeTool):
             pass
 
 
-class FCSemiDisc(FCShapeTool):
+class DiscSemiEditorGrb(ShapeToolEditorGrb):
     def __init__(self, draw_app):
         DrawTool.__init__(self, draw_app)
         self.name = 'semidisc'
@@ -1600,7 +1600,7 @@ class FCSemiDisc(FCShapeTool):
         try:
             QtGui.QGuiApplication.restoreOverrideCursor()
         except Exception as e:
-            log.debug("AppGerberEditor.FCSemiDisc --> %s" % str(e))
+            log.debug("AppGerberEditor.DiscSemiEditorGrb --> %s" % str(e))
 
         self.cursor = QtGui.QCursor(QtGui.QPixmap(self.draw_app.app.resource_location + '/aero_semidisc.png'))
         QtGui.QGuiApplication.setOverrideCursor(self.cursor)
@@ -1880,9 +1880,9 @@ class FCSemiDisc(FCShapeTool):
             pass
 
 
-class FCScale(FCShapeTool):
+class ScaleEditorGrb(ShapeToolEditorGrb):
     def __init__(self, draw_app):
-        FCShapeTool.__init__(self, draw_app)
+        ShapeToolEditorGrb.__init__(self, draw_app)
         self.name = 'scale'
 
         # self.shape_buffer = self.draw_app.shape_buffer
@@ -1922,9 +1922,9 @@ class FCScale(FCShapeTool):
         self.draw_app.plot_all()
 
 
-class FCBuffer(FCShapeTool):
+class BufferEditorGrb(ShapeToolEditorGrb):
     def __init__(self, draw_app):
-        FCShapeTool.__init__(self, draw_app)
+        ShapeToolEditorGrb.__init__(self, draw_app)
         self.name = 'buffer'
 
         # self.shape_buffer = self.draw_app.shape_buffer
@@ -1964,9 +1964,9 @@ class FCBuffer(FCShapeTool):
         self.draw_app.plot_all()
 
 
-class FCMarkArea(FCShapeTool):
+class MarkEditorGrb(ShapeToolEditorGrb):
     def __init__(self, draw_app):
-        FCShapeTool.__init__(self, draw_app)
+        ShapeToolEditorGrb.__init__(self, draw_app)
         self.name = 'markarea'
 
         # self.shape_buffer = self.draw_app.shape_buffer
@@ -2027,7 +2027,7 @@ class FCMarkArea(FCShapeTool):
         self.draw_app.plot_all()
 
 
-class FCApertureMove(FCShapeTool):
+class MoveEditorGrb(ShapeToolEditorGrb):
     def __init__(self, draw_app):
         DrawTool.__init__(self, draw_app)
         self.name = 'move'
@@ -2211,9 +2211,9 @@ class FCApertureMove(FCShapeTool):
             return DrawToolUtilityShape(ss_el)
 
 
-class FCApertureCopy(FCApertureMove):
+class CopyEditorGrb(MoveEditorGrb):
     def __init__(self, draw_app):
-        FCApertureMove.__init__(self, draw_app)
+        MoveEditorGrb.__init__(self, draw_app)
         self.name = 'copy'
 
     def make(self):
@@ -2249,7 +2249,7 @@ class FCApertureCopy(FCApertureMove):
         self.draw_app.app.jump_signal.disconnect()
 
 
-class FCEraser(FCShapeTool):
+class EraserEditorGrb(ShapeToolEditorGrb):
     def __init__(self, draw_app):
         DrawTool.__init__(self, draw_app)
         self.name = 'eraser'
@@ -2305,7 +2305,7 @@ class FCEraser(FCShapeTool):
             try:
                 self.draw_app.ui.apertures_table.cellPressed.disconnect()
             except Exception as e:
-                log.debug("AppGerberEditor.FCEraser.click_release() --> %s" % str(e))
+                log.debug("AppGerberEditor.EraserEditorGrb.click_release() --> %s" % str(e))
 
             self.draw_app.ui.apertures_table.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
             for aper in sel_aperture:
@@ -2397,7 +2397,7 @@ class FCEraser(FCShapeTool):
         return DrawToolUtilityShape(geo_list)
 
 
-class FCApertureSelect(DrawTool):
+class SelectEditorGrb(DrawTool):
     def __init__(self, draw_app):
         DrawTool.__init__(self, draw_app)
         self.name = 'select'
@@ -2410,8 +2410,8 @@ class FCApertureSelect(DrawTool):
         # here we store all shapes that were selected
         self.sel_storage = []
 
-        # since FCApertureSelect tool is activated whenever a tool is exited I place here the reinitialization of the
-        # bending modes using in FCRegion and FCTrack
+        # since SelectEditorGrb tool is activated whenever a tool is exited I place here the reinitialization of the
+        # bending modes using in RegionEditorGrb and TrackEditorGrb
         self.draw_app.bend_mode = 1
 
         # here store the selected apertures
@@ -2420,7 +2420,7 @@ class FCApertureSelect(DrawTool):
         try:
             self.draw_app.ui.apertures_table.clearSelection()
         except Exception as e:
-            log.error("FlatCAMGerbEditor.FCApertureSelect.__init__() --> %s" % str(e))
+            log.error("FlatCAMGerbEditor.SelectEditorGrb.__init__() --> %s" % str(e))
 
         self.draw_app.hide_tool('all')
         self.draw_app.hide_tool('select')
@@ -2429,7 +2429,7 @@ class FCApertureSelect(DrawTool):
         try:
             QtGui.QGuiApplication.restoreOverrideCursor()
         except Exception as e:
-            log.debug("AppGerberEditor.FCApertureSelect --> %s" % str(e))
+            log.debug("AppGerberEditor.SelectEditorGrb --> %s" % str(e))
 
         try:
             self.draw_app.selection_triggered.disconnect()
@@ -2507,7 +2507,7 @@ class FCApertureSelect(DrawTool):
                 try:
                     editor_obj.ui.apertures_table.cellPressed.disconnect()
                 except Exception as e:
-                    log.debug("AppGerberEditor.FCApertureSelect.click_release() --> %s" % str(e))
+                    log.debug("AppGerberEditor.SelectEditorGrb.click_release() --> %s" % str(e))
 
                 brake_flag = False
                 for shape_s in editor_obj.selected:
@@ -2538,9 +2538,9 @@ class FCApertureSelect(DrawTool):
         self.draw_app.plot_all()
 
 
-class FCTransform(FCShapeTool):
+class TransformEditorGrb(ShapeToolEditorGrb):
     def __init__(self, draw_app):
-        FCShapeTool.__init__(self, draw_app)
+        ShapeToolEditorGrb.__init__(self, draw_app)
         self.name = 'transformation'
 
         # self.shape_buffer = self.draw_app.shape_buffer
@@ -2663,7 +2663,7 @@ class AppGerberEditor(QtCore.QObject):
         self.snap_y = None
         self.pos = None
 
-        # used in FCRegion and FCTrack. Will store the bending mode
+        # used in RegionEditorGrb and TrackEditorGrb. Will store the bending mode
         self.bend_mode = 1
 
         # signal that there is an action active like polygon or path
@@ -2779,21 +2779,21 @@ class AppGerberEditor(QtCore.QObject):
 
     def connect_grb_toolbar_signals(self):
         self.tools_gerber.update({
-            "select": {"button": self.app.ui.grb_select_btn,            "constructor": FCApertureSelect},
-            "pad": {"button": self.app.ui.grb_add_pad_btn,              "constructor": FCPad},
-            "array": {"button": self.app.ui.add_pad_ar_btn,             "constructor": FCPadArray},
-            "track": {"button": self.app.ui.grb_add_track_btn,          "constructor": FCTrack},
-            "region": {"button": self.app.ui.grb_add_region_btn,        "constructor": FCRegion},
-            "poligonize": {"button": self.app.ui.grb_convert_poly_btn,  "constructor": FCPoligonize},
-            "semidisc": {"button": self.app.ui.grb_add_semidisc_btn,    "constructor": FCSemiDisc},
-            "disc": {"button": self.app.ui.grb_add_disc_btn,            "constructor": FCDisc},
-            "buffer": {"button": self.app.ui.aperture_buffer_btn,       "constructor": FCBuffer},
-            "scale": {"button": self.app.ui.aperture_scale_btn,         "constructor": FCScale},
-            "markarea": {"button": self.app.ui.aperture_markarea_btn,   "constructor": FCMarkArea},
-            "eraser": {"button": self.app.ui.aperture_eraser_btn,       "constructor": FCEraser},
-            "copy": {"button": self.app.ui.aperture_copy_btn,           "constructor": FCApertureCopy},
-            "transform": {"button": self.app.ui.grb_transform_btn,      "constructor": FCTransform},
-            "move": {"button": self.app.ui.aperture_move_btn,           "constructor": FCApertureMove},
+            "select": {"button": self.app.ui.grb_select_btn,            "constructor": SelectEditorGrb},
+            "pad": {"button": self.app.ui.grb_add_pad_btn,              "constructor": PadEditorGrb},
+            "array": {"button": self.app.ui.add_pad_ar_btn,             "constructor": PadArrayEditorGrb},
+            "track": {"button": self.app.ui.grb_add_track_btn,          "constructor": TrackEditorGrb},
+            "region": {"button": self.app.ui.grb_add_region_btn,        "constructor": RegionEditorGrb},
+            "poligonize": {"button": self.app.ui.grb_convert_poly_btn,  "constructor": PoligonizeEditorGrb},
+            "semidisc": {"button": self.app.ui.grb_add_semidisc_btn,    "constructor": DiscSemiEditorGrb},
+            "disc": {"button": self.app.ui.grb_add_disc_btn,            "constructor": DiscEditorGrb},
+            "buffer": {"button": self.app.ui.aperture_buffer_btn,       "constructor": BufferEditorGrb},
+            "scale": {"button": self.app.ui.aperture_scale_btn,         "constructor": ScaleEditorGrb},
+            "markarea": {"button": self.app.ui.aperture_markarea_btn,   "constructor": MarkEditorGrb},
+            "eraser": {"button": self.app.ui.aperture_eraser_btn,       "constructor": EraserEditorGrb},
+            "copy": {"button": self.app.ui.aperture_copy_btn,           "constructor": CopyEditorGrb},
+            "transform": {"button": self.app.ui.grb_transform_btn,      "constructor": TransformEditorGrb},
+            "move": {"button": self.app.ui.aperture_move_btn,           "constructor": MoveEditorGrb},
         })
 
         for tool in self.tools_gerber:
@@ -3800,6 +3800,7 @@ class AppGerberEditor(QtCore.QObject):
                                         pass
                                     else:
                                         for clear_geo in global_clear_geo:
+                                            # Make sure that the clear_geo is within the solid_geo otherwise we loose
                                             # Make sure that the clear_geo is within the solid_geo otherwise we loose
                                             # the solid_geometry. We want for clear_geometry just to cut into
                                             # solid_geometry not to delete it
@@ -4072,7 +4073,7 @@ class AppGerberEditor(QtCore.QObject):
                     self.tools_gerber[t]["button"].setChecked(False)
 
                 self.select_tool('select')
-                self.active_tool = FCApertureSelect(self)
+                self.active_tool = SelectEditorGrb(self)
 
     def on_row_selected(self, row, col):
         # if col == 0:
@@ -4215,7 +4216,7 @@ class AppGerberEditor(QtCore.QObject):
                 self.active_tool.click(self.app.geo_editor.snap(self.pos[0], self.pos[1]))
 
                 # If it is a shape generating tool
-                if isinstance(self.active_tool, FCShapeTool) and self.active_tool.complete:
+                if isinstance(self.active_tool, ShapeToolEditorGrb) and self.active_tool.complete:
                     if self.current_storage is not None:
                         self.on_grb_shape_complete(self.current_storage)
                         self.build_ui()
@@ -4233,14 +4234,14 @@ class AppGerberEditor(QtCore.QObject):
                     if key_modifier == modifier_to_use:
                         self.select_tool(self.active_tool.name)
                     else:
-                        # return to Select tool but not for FCPad
-                        if isinstance(self.active_tool, FCPad):
+                        # return to Select tool but not for PadEditorGrb
+                        if isinstance(self.active_tool, PadEditorGrb):
                             self.select_tool(self.active_tool.name)
                         else:
                             self.select_tool("select")
                         return
 
-                # if isinstance(self.active_tool, FCApertureSelect):
+                # if isinstance(self.active_tool, SelectEditorGrb):
                 #     self.plot_all()
             else:
                 self.app.log.debug("No active tool to respond to click!")
@@ -4273,7 +4274,7 @@ class AppGerberEditor(QtCore.QObject):
                         except Exception as e:
                             log.debug("AppGerberEditor.on_grb_click_release() --> %s" % str(e))
 
-                        if self.active_tool.complete is False and not isinstance(self.active_tool, FCApertureSelect):
+                        if self.active_tool.complete is False and not isinstance(self.active_tool, SelectEditorGrb):
                             self.active_tool.complete = True
                             self.in_action = False
                             self.delete_utility_geometry()
@@ -4287,8 +4288,8 @@ class AppGerberEditor(QtCore.QObject):
                     else:
                         # if right click on canvas and the active tool need to be finished (like Path or Polygon)
                         # right mouse click will finish the action
-                        if isinstance(self.active_tool, FCShapeTool):
-                            if isinstance(self.active_tool, FCTrack):
+                        if isinstance(self.active_tool, ShapeToolEditorGrb):
+                            if isinstance(self.active_tool, TrackEditorGrb):
                                 self.active_tool.make()
                             else:
                                 self.active_tool.click(self.app.geo_editor.snap(self.x, self.y))
@@ -4298,9 +4299,9 @@ class AppGerberEditor(QtCore.QObject):
                                 self.app.inform.emit('[success] %s' % _("Done."))
 
                                 # MS: always return to the Select Tool if modifier key is not pressed
-                                # else return to the current tool but not for FCTrack
+                                # else return to the current tool but not for TrackEditorGrb
 
-                                if isinstance(self.active_tool, FCTrack):
+                                if isinstance(self.active_tool, TrackEditorGrb):
                                     self.select_tool(self.active_tool.name)
                                 else:
                                     key_modifier = QtWidgets.QApplication.keyboardModifiers()
@@ -4324,7 +4325,7 @@ class AppGerberEditor(QtCore.QObject):
                     self.draw_selection_area_handler(self.pos, pos, self.app.selection_type)
                     self.app.selection_type = None
 
-                elif isinstance(self.active_tool, FCApertureSelect):
+                elif isinstance(self.active_tool, SelectEditorGrb):
                     self.active_tool.click_release((self.pos[0], self.pos[1]))
 
                     # # if there are selected objects then plot them
@@ -4461,9 +4462,9 @@ class AppGerberEditor(QtCore.QObject):
 
         # # ## Selection area on canvas section # ##
         if event_is_dragging == 1 and event.button == 1:
-            # I make an exception for FCRegion and FCTrack because clicking and dragging while making regions can
-            # create strange issues like missing a point in a track/region
-            if isinstance(self.active_tool, FCRegion) or isinstance(self.active_tool, FCTrack):
+            # I make an exception for RegionEditorGrb and TrackEditorGrb because clicking and dragging while making 
+            # regions can create strange issues like missing a point in a track/region
+            if isinstance(self.active_tool, RegionEditorGrb) or isinstance(self.active_tool, TrackEditorGrb):
                 pass
             else:
                 dx = pos_canvas[0] - self.pos[0]
@@ -4944,7 +4945,7 @@ class AppGerberEditor(QtCore.QObject):
         self.select_tool('eraser')
 
     def on_transform(self):
-        if type(self.active_tool) == FCTransform:
+        if type(self.active_tool) == TransformEditorGrb:
             self.select_tool('select')
         else:
             self.select_tool('transform')
@@ -4988,19 +4989,19 @@ class AppGerberEditorUI:
 
         # Page Title icon
         pixmap = QtGui.QPixmap(self.app.resource_location + '/flatcam_icon32.png')
-        self.icon = QtWidgets.QLabel()
+        self.icon = FCLabel()
         self.icon.setPixmap(pixmap)
         self.title_box.addWidget(self.icon, stretch=0)
 
         # Title label
-        self.title_label = QtWidgets.QLabel("<font size=5><b>%s</b></font>" % _('Gerber Editor'))
+        self.title_label = FCLabel("<font size=5><b>%s</b></font>" % _('Gerber Editor'))
         self.title_label.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
         self.title_box.addWidget(self.title_label, stretch=1)
 
         # Object name
         self.name_box = QtWidgets.QHBoxLayout()
         layout.addLayout(self.name_box)
-        name_label = QtWidgets.QLabel(_("Name:"))
+        name_label = FCLabel(_("Name:"))
         self.name_box.addWidget(name_label)
         self.name_entry = FCEntry()
         self.name_box.addWidget(self.name_entry)
@@ -5013,7 +5014,7 @@ class AppGerberEditorUI:
         # #########################
         # ### Gerber Apertures ####
         # #########################
-        self.apertures_table_label = QtWidgets.QLabel('<b>%s:</b>' % _('Apertures'))
+        self.apertures_table_label = FCLabel('<b>%s:</b>' % _('Apertures'))
         self.apertures_table_label.setToolTip(
             _("Apertures Table for the Gerber Object.")
         )
@@ -5043,7 +5044,7 @@ class AppGerberEditorUI:
               " - (width, height) for R, O type.\n"
               " - (dia, nVertices) for P type"))
 
-        self.empty_label = QtWidgets.QLabel('')
+        self.empty_label = FCLabel('')
         self.custom_box.addWidget(self.empty_label)
 
         # add a frame and inside add a vertical box layout. Inside this vbox layout I add all the Apertures widgets
@@ -5062,7 +5063,7 @@ class AppGerberEditorUI:
         grid1.setColumnStretch(0, 0)
         grid1.setColumnStretch(1, 1)
 
-        apcode_lbl = QtWidgets.QLabel('%s:' % _('Aperture Code'))
+        apcode_lbl = FCLabel('%s:' % _('Aperture Code'))
         apcode_lbl.setToolTip(_("Code for the new aperture"))
         grid1.addWidget(apcode_lbl, 1, 0)
 
@@ -5072,7 +5073,7 @@ class AppGerberEditorUI:
 
         grid1.addWidget(self.apcode_entry, 1, 1)
 
-        apsize_lbl = QtWidgets.QLabel('%s' % _('Aperture Size:'))
+        apsize_lbl = FCLabel('%s' % _('Aperture Size:'))
         apsize_lbl.setToolTip(
             _("Size for the new aperture.\n"
               "If aperture type is 'R' or 'O' then\n"
@@ -5088,7 +5089,7 @@ class AppGerberEditorUI:
 
         grid1.addWidget(self.apsize_entry, 2, 1)
 
-        aptype_lbl = QtWidgets.QLabel('%s:' % _('Aperture Type'))
+        aptype_lbl = FCLabel('%s:' % _('Aperture Type'))
         aptype_lbl.setToolTip(
             _("Select the type of new aperture. Can be:\n"
               "C = circular\n"
@@ -5101,7 +5102,7 @@ class AppGerberEditorUI:
         self.aptype_cb.addItems(['C', 'R', 'O'])
         grid1.addWidget(self.aptype_cb, 3, 1)
 
-        self.apdim_lbl = QtWidgets.QLabel('%s:' % _('Aperture Dim'))
+        self.apdim_lbl = FCLabel('%s:' % _('Aperture Dim'))
         self.apdim_lbl.setToolTip(
             _("Dimensions for the new aperture.\n"
               "Active only for rectangular apertures (type R).\n"
@@ -5112,7 +5113,7 @@ class AppGerberEditorUI:
         self.apdim_entry = EvalEntry2()
         grid1.addWidget(self.apdim_entry, 4, 1)
 
-        apadd_del_lbl = QtWidgets.QLabel('<b>%s:</b>' % _('Add/Delete Aperture'))
+        apadd_del_lbl = FCLabel('<b>%s:</b>' % _('Add/Delete Aperture'))
         apadd_del_lbl.setToolTip(
             _("Add/Delete an aperture in the aperture table")
         )
@@ -5121,12 +5122,14 @@ class AppGerberEditorUI:
         hlay_ad = QtWidgets.QHBoxLayout()
         self.apertures_box.addLayout(hlay_ad)
 
-        self.addaperture_btn = QtWidgets.QPushButton(_('Add'))
+        self.addaperture_btn = FCButton(_('Add'))
+        self.addaperture_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
         self.addaperture_btn.setToolTip(
             _("Add a new aperture to the aperture list.")
         )
 
-        self.delaperture_btn = QtWidgets.QPushButton(_('Delete'))
+        self.delaperture_btn = FCButton(_('Delete'))
+        self.delaperture_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/trash32.png'))
         self.delaperture_btn.setToolTip(
             _("Delete a aperture in the aperture list")
         )
@@ -5145,7 +5148,7 @@ class AppGerberEditorUI:
         self.buffer_tool_frame.hide()
 
         # Title
-        buf_title_lbl = QtWidgets.QLabel('<b>%s:</b>' % _('Buffer Aperture'))
+        buf_title_lbl = FCLabel('<b>%s:</b>' % _('Buffer Aperture'))
         buf_title_lbl.setToolTip(
             _("Buffer a aperture in the aperture list")
         )
@@ -5161,7 +5164,7 @@ class AppGerberEditorUI:
         self.buffer_distance_entry.set_range(-10000.0000, 10000.0000)
 
         buf_form_layout.addRow('%s:' % _("Buffer distance"), self.buffer_distance_entry)
-        self.buffer_corner_lbl = QtWidgets.QLabel('%s:' % _("Buffer corner"))
+        self.buffer_corner_lbl = FCLabel('%s:' % _("Buffer corner"))
         self.buffer_corner_lbl.setToolTip(
             _("There are 3 types of corners:\n"
               " - 'Round': the corner is rounded.\n"
@@ -5178,7 +5181,8 @@ class AppGerberEditorUI:
         hlay_buf = QtWidgets.QHBoxLayout()
         self.buffer_tools_box.addLayout(hlay_buf)
 
-        self.buffer_button = QtWidgets.QPushButton(_("Buffer"))
+        self.buffer_button = FCButton(_("Buffer"))
+        self.buffer_button.setIcon(QtGui.QIcon(self.app.resource_location + '/buffer16-2.png'))
         hlay_buf.addWidget(self.buffer_button)
 
         # ##################
@@ -5193,7 +5197,7 @@ class AppGerberEditorUI:
         self.scale_tool_frame.hide()
 
         # Title
-        scale_title_lbl = QtWidgets.QLabel('<b>%s:</b>' % _('Scale Aperture'))
+        scale_title_lbl = FCLabel('<b>%s:</b>' % _('Scale Aperture'))
         scale_title_lbl.setToolTip(
             _("Scale a aperture in the aperture list")
         )
@@ -5203,7 +5207,7 @@ class AppGerberEditorUI:
         scale_form_layout = QtWidgets.QFormLayout()
         self.scale_tools_box.addLayout(scale_form_layout)
 
-        self.scale_factor_lbl = QtWidgets.QLabel('%s:' % _("Scale factor"))
+        self.scale_factor_lbl = FCLabel('%s:' % _("Scale factor"))
         self.scale_factor_lbl.setToolTip(
             _("The factor by which to scale the selected aperture.\n"
               "Values can be between 0.0000 and 999.9999")
@@ -5218,7 +5222,8 @@ class AppGerberEditorUI:
         hlay_scale = QtWidgets.QHBoxLayout()
         self.scale_tools_box.addLayout(hlay_scale)
 
-        self.scale_button = QtWidgets.QPushButton(_("Scale"))
+        self.scale_button = FCButton(_("Scale"))
+        self.scale_button.setIcon(QtGui.QIcon(self.app.resource_location + '/clean32.png'))
         hlay_scale.addWidget(self.scale_button)
 
         # ######################
@@ -5233,7 +5238,7 @@ class AppGerberEditorUI:
         self.ma_tool_frame.hide()
 
         # Title
-        ma_title_lbl = QtWidgets.QLabel('<b>%s:</b>' % _('Mark polygons'))
+        ma_title_lbl = FCLabel('<b>%s:</b>' % _('Mark polygons'))
         ma_title_lbl.setToolTip(
             _("Mark the polygon areas.")
         )
@@ -5243,7 +5248,7 @@ class AppGerberEditorUI:
         ma_form_layout = QtWidgets.QFormLayout()
         self.ma_tools_box.addLayout(ma_form_layout)
 
-        self.ma_upper_threshold_lbl = QtWidgets.QLabel('%s:' % _("Area UPPER threshold"))
+        self.ma_upper_threshold_lbl = FCLabel('%s:' % _("Area UPPER threshold"))
         self.ma_upper_threshold_lbl.setToolTip(
             _("The threshold value, all areas less than this are marked.\n"
               "Can have a value between 0.0000 and 10000.0000")
@@ -5252,7 +5257,7 @@ class AppGerberEditorUI:
         self.ma_upper_threshold_entry.set_precision(self.decimals)
         self.ma_upper_threshold_entry.set_range(0, 10000)
 
-        self.ma_lower_threshold_lbl = QtWidgets.QLabel('%s:' % _("Area LOWER threshold"))
+        self.ma_lower_threshold_lbl = FCLabel('%s:' % _("Area LOWER threshold"))
         self.ma_lower_threshold_lbl.setToolTip(
             _("The threshold value, all areas more than this are marked.\n"
               "Can have a value between 0.0000 and 10000.0000")
@@ -5268,19 +5273,22 @@ class AppGerberEditorUI:
         hlay_ma = QtWidgets.QHBoxLayout()
         self.ma_tools_box.addLayout(hlay_ma)
 
-        self.ma_threshold_button = QtWidgets.QPushButton(_("Mark"))
+        self.ma_threshold_button = FCButton(_("Mark"))
+        self.ma_threshold_button.setIcon(QtGui.QIcon(self.app.resource_location + '/markarea32.png'))
         self.ma_threshold_button.setToolTip(
             _("Mark the polygons that fit within limits.")
         )
         hlay_ma.addWidget(self.ma_threshold_button)
 
-        self.ma_delete_button = QtWidgets.QPushButton(_("Delete"))
+        self.ma_delete_button = FCButton(_("Delete"))
+        self.ma_delete_button.setIcon(QtGui.QIcon(self.app.resource_location + '/trash32.png'))
         self.ma_delete_button.setToolTip(
             _("Delete all the marked polygons.")
         )
         hlay_ma.addWidget(self.ma_delete_button)
 
-        self.ma_clear_button = QtWidgets.QPushButton(_("Clear"))
+        self.ma_clear_button = FCButton(_("Clear"))
+        self.ma_clear_button.setIcon(QtGui.QIcon(self.app.resource_location + '/clean32.png'))
         self.ma_clear_button.setToolTip(
             _("Clear all the markings.")
         )
@@ -5299,10 +5307,10 @@ class AppGerberEditorUI:
         self.array_box.setContentsMargins(0, 0, 0, 0)
         self.array_frame.setLayout(self.array_box)
 
-        self.emptyarray_label = QtWidgets.QLabel('')
+        self.emptyarray_label = FCLabel('')
         self.array_box.addWidget(self.emptyarray_label)
 
-        self.padarray_label = QtWidgets.QLabel('<b>%s</b>' % _("Add Pad Array"))
+        self.padarray_label = FCLabel('<b>%s</b>' % _("Add Pad Array"))
         self.padarray_label.setToolTip(
             _("Add an array of pads (linear or circular array)")
         )
@@ -5321,7 +5329,7 @@ class AppGerberEditorUI:
         self.array_form = QtWidgets.QFormLayout()
         self.array_box.addLayout(self.array_form)
 
-        self.pad_array_size_label = QtWidgets.QLabel('%s:' % _('Nr of pads'))
+        self.pad_array_size_label = FCLabel('%s:' % _('Nr of pads'))
         self.pad_array_size_label.setToolTip(
             _("Specify how many pads to be in the array.")
         )
@@ -5342,7 +5350,7 @@ class AppGerberEditorUI:
         self.linear_form = QtWidgets.QFormLayout()
         self.linear_box.addLayout(self.linear_form)
 
-        self.pad_axis_label = QtWidgets.QLabel('%s:' % _('Direction'))
+        self.pad_axis_label = FCLabel('%s:' % _('Direction'))
         self.pad_axis_label.setToolTip(
             _("Direction on which the linear array is oriented:\n"
               "- 'X' - horizontal axis \n"
@@ -5357,7 +5365,7 @@ class AppGerberEditorUI:
         self.pad_axis_radio.set_value('X')
         self.linear_form.addRow(self.pad_axis_label, self.pad_axis_radio)
 
-        self.pad_pitch_label = QtWidgets.QLabel('%s:' % _('Pitch'))
+        self.pad_pitch_label = FCLabel('%s:' % _('Pitch'))
         self.pad_pitch_label.setToolTip(
             _("Pitch = Distance between elements of the array.")
         )
@@ -5370,7 +5378,7 @@ class AppGerberEditorUI:
 
         self.linear_form.addRow(self.pad_pitch_label, self.pad_pitch_entry)
 
-        self.linear_angle_label = QtWidgets.QLabel('%s:' % _('Angle'))
+        self.linear_angle_label = FCLabel('%s:' % _('Angle'))
         self.linear_angle_label.setToolTip(
             _("Angle at which the linear array is placed.\n"
               "The precision is of max 2 decimals.\n"
@@ -5391,7 +5399,7 @@ class AppGerberEditorUI:
         self.circular_box.setContentsMargins(0, 0, 0, 0)
         self.array_circular_frame.setLayout(self.circular_box)
 
-        self.pad_direction_label = QtWidgets.QLabel('%s:' % _('Direction'))
+        self.pad_direction_label = FCLabel('%s:' % _('Direction'))
         self.pad_direction_label.setToolTip(
             _("Direction for circular array.\n"
               "Can be CW = clockwise or CCW = counter clockwise.")
@@ -5406,7 +5414,7 @@ class AppGerberEditorUI:
         self.pad_direction_radio.set_value('CW')
         self.circular_form.addRow(self.pad_direction_label, self.pad_direction_radio)
 
-        self.pad_angle_label = QtWidgets.QLabel('%s:' % _('Angle'))
+        self.pad_angle_label = FCLabel('%s:' % _('Angle'))
         self.pad_angle_label.setToolTip(
             _("Angle at which each element in circular array is placed.")
         )
@@ -5430,7 +5438,7 @@ class AppGerberEditorUI:
         layout.addStretch()
 
         # Editor
-        self.exit_editor_button = QtWidgets.QPushButton(_('Exit Editor'))
+        self.exit_editor_button = FCButton(_('Exit Editor'))
         self.exit_editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/power16.png'))
         self.exit_editor_button.setToolTip(
             _("Exit from Editor.")
@@ -5465,7 +5473,7 @@ class TransformEditorTool(AppTool):
         self.decimals = self.app.decimals
 
         # ## Title
-        title_label = QtWidgets.QLabel("%s" % self.toolName)
+        title_label = FCLabel("%s" % self.toolName)
         title_label.setStyleSheet("""
                                         QLabel
                                         {
@@ -5474,7 +5482,7 @@ class TransformEditorTool(AppTool):
                                         }
                                         """)
         self.layout.addWidget(title_label)
-        self.layout.addWidget(QtWidgets.QLabel(''))
+        self.layout.addWidget(FCLabel(''))
 
         # ## Layout
         grid0 = QtWidgets.QGridLayout()
@@ -5483,10 +5491,10 @@ class TransformEditorTool(AppTool):
         grid0.setColumnStretch(1, 1)
         grid0.setColumnStretch(2, 0)
 
-        grid0.addWidget(QtWidgets.QLabel(''))
+        grid0.addWidget(FCLabel(''))
 
         # Reference
-        ref_label = QtWidgets.QLabel('%s:' % _("Reference"))
+        ref_label = FCLabel('%s:' % _("Reference"))
         ref_label.setToolTip(
             _("The reference point for Rotate, Skew, Scale, Mirror.\n"
               "Can be:\n"
@@ -5502,7 +5510,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(ref_label, 0, 0)
         grid0.addWidget(self.ref_combo, 0, 1, 1, 2)
 
-        self.point_label = QtWidgets.QLabel('%s:' % _("Value"))
+        self.point_label = FCLabel('%s:' % _("Value"))
         self.point_label.setToolTip(
             _("A point of reference in format X,Y.")
         )
@@ -5523,10 +5531,10 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(separator_line, 5, 0, 1, 3)
 
         # ## Rotate Title
-        rotate_title_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.rotateName)
+        rotate_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.rotateName)
         grid0.addWidget(rotate_title_label, 6, 0, 1, 3)
 
-        self.rotate_label = QtWidgets.QLabel('%s:' % _("Angle"))
+        self.rotate_label = FCLabel('%s:' % _("Angle"))
         self.rotate_label.setToolTip(
             _("Angle, in degrees.\n"
               "Float number between -360 and 359.\n"
@@ -5560,7 +5568,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(separator_line, 8, 0, 1, 3)
 
         # ## Skew Title
-        skew_title_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.skewName)
+        skew_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.skewName)
         grid0.addWidget(skew_title_label, 9, 0, 1, 2)
 
         self.skew_link_cb = FCCheckBox()
@@ -5571,7 +5579,7 @@ class TransformEditorTool(AppTool):
 
         grid0.addWidget(self.skew_link_cb, 9, 2)
 
-        self.skewx_label = QtWidgets.QLabel('%s:' % _("X angle"))
+        self.skewx_label = FCLabel('%s:' % _("X angle"))
         self.skewx_label.setToolTip(
             _("Angle for Skew action, in degrees.\n"
               "Float number between -360 and 360.")
@@ -5592,7 +5600,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(self.skewx_entry, 10, 1)
         grid0.addWidget(self.skewx_button, 10, 2)
 
-        self.skewy_label = QtWidgets.QLabel('%s:' % _("Y angle"))
+        self.skewy_label = FCLabel('%s:' % _("Y angle"))
         self.skewy_label.setToolTip(
             _("Angle for Skew action, in degrees.\n"
               "Float number between -360 and 360.")
@@ -5622,7 +5630,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(separator_line, 14, 0, 1, 3)
 
         # ## Scale Title
-        scale_title_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.scaleName)
+        scale_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.scaleName)
         grid0.addWidget(scale_title_label, 15, 0, 1, 2)
 
         self.scale_link_cb = FCCheckBox()
@@ -5633,7 +5641,7 @@ class TransformEditorTool(AppTool):
 
         grid0.addWidget(self.scale_link_cb, 15, 2)
 
-        self.scalex_label = QtWidgets.QLabel('%s:' % _("X factor"))
+        self.scalex_label = FCLabel('%s:' % _("X factor"))
         self.scalex_label.setToolTip(
             _("Factor for scaling on X axis.")
         )
@@ -5653,7 +5661,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(self.scalex_entry, 17, 1)
         grid0.addWidget(self.scalex_button, 17, 2)
 
-        self.scaley_label = QtWidgets.QLabel('%s:' % _("Y factor"))
+        self.scaley_label = FCLabel('%s:' % _("Y factor"))
         self.scaley_label.setToolTip(
             _("Factor for scaling on Y axis.")
         )
@@ -5686,7 +5694,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(separator_line, 21, 0, 1, 3)
 
         # ## Flip Title
-        flip_title_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.flipName)
+        flip_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.flipName)
         grid0.addWidget(flip_title_label, 23, 0, 1, 3)
 
         self.flipx_button = FCButton(_("Flip on X"))
@@ -5711,10 +5719,10 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(separator_line, 27, 0, 1, 3)
 
         # ## Offset Title
-        offset_title_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.offsetName)
+        offset_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.offsetName)
         grid0.addWidget(offset_title_label, 29, 0, 1, 3)
 
-        self.offx_label = QtWidgets.QLabel('%s:' % _("X val"))
+        self.offx_label = FCLabel('%s:' % _("X val"))
         self.offx_label.setToolTip(
             _("Distance to offset on X axis. In current units.")
         )
@@ -5734,7 +5742,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(self.offx_entry, 31, 1)
         grid0.addWidget(self.offx_button, 31, 2)
 
-        self.offy_label = QtWidgets.QLabel('%s:' % _("Y val"))
+        self.offy_label = FCLabel('%s:' % _("Y val"))
         self.offy_label.setToolTip(
             _("Distance to offset on Y axis. In current units.")
         )
@@ -5760,7 +5768,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(separator_line, 34, 0, 1, 3)
 
         # ## Buffer Title
-        buffer_title_label = QtWidgets.QLabel("<font size=3><b>%s</b></font>" % self.bufferName)
+        buffer_title_label = FCLabel("<font size=3><b>%s</b></font>" % self.bufferName)
         grid0.addWidget(buffer_title_label, 35, 0, 1, 2)
 
         self.buffer_rounded_cb = FCCheckBox('%s' % _("Rounded"))
@@ -5773,7 +5781,7 @@ class TransformEditorTool(AppTool):
 
         grid0.addWidget(self.buffer_rounded_cb, 35, 2)
 
-        self.buffer_label = QtWidgets.QLabel('%s:' % _("Distance"))
+        self.buffer_label = FCLabel('%s:' % _("Distance"))
         self.buffer_label.setToolTip(
             _("A positive value will create the effect of dilation,\n"
               "while a negative value will create the effect of erosion.\n"
@@ -5798,7 +5806,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(self.buffer_entry, 37, 1)
         grid0.addWidget(self.buffer_button, 37, 2)
 
-        self.buffer_factor_label = QtWidgets.QLabel('%s:' % _("Value"))
+        self.buffer_factor_label = FCLabel('%s:' % _("Value"))
         self.buffer_factor_label.setToolTip(
             _("A positive value will create the effect of dilation,\n"
               "while a negative value will create the effect of erosion.\n"
@@ -5824,7 +5832,7 @@ class TransformEditorTool(AppTool):
         grid0.addWidget(self.buffer_factor_entry, 38, 1)
         grid0.addWidget(self.buffer_factor_button, 38, 2)
 
-        grid0.addWidget(QtWidgets.QLabel(''), 42, 0, 1, 3)
+        grid0.addWidget(FCLabel(''), 42, 0, 1, 3)
 
         self.layout.addStretch()
 
@@ -6340,12 +6348,12 @@ class TransformEditorTool(AppTool):
                 return
 
     def on_rotate_key(self):
-        val_box = FCInputDialog(title=_("Rotate ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_rotate']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
+        val_box = FCInputDoubleSpinner(title=_("Rotate ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_rotate']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/rotate.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -6358,11 +6366,11 @@ class TransformEditorTool(AppTool):
     def on_offx_key(self):
         units = self.app.defaults['units'].lower()
 
-        val_box = FCInputDialog(title=_("Offset on X axis ..."),
-                                text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
-                                min=-10000.0000, max=10000.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_offset_x']),
-                                parent=self.app.ui)
+        val_box = FCInputDoubleSpinner(title=_("Offset on X axis ..."),
+                                       text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
+                                       min=-10000.0000, max=10000.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_offset_x']),
+                                       parent=self.app.ui)
         val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsetx32.png'))
 
         val, ok = val_box.get_value()
@@ -6376,12 +6384,12 @@ class TransformEditorTool(AppTool):
     def on_offy_key(self):
         units = self.app.defaults['units'].lower()
 
-        val_box = FCInputDialog(title=_("Offset on Y axis ..."),
-                                text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
-                                min=-10000.0000, max=10000.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_offset_y']),
-                                parent=self.app.ui)
-        val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
+        val_box = FCInputDoubleSpinner(title=_("Offset on Y axis ..."),
+                                       text='%s: (%s)' % (_('Enter a distance Value'), str(units)),
+                                       min=-10000.0000, max=10000.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_offset_y']),
+                                       parent=self.app.ui)
+        val_box.set_icon(QtGui.QIcon(self.app.resource_location + '/offsety32.png'))
 
         val, ok = val_box.get_value()
         if ok:
@@ -6392,11 +6400,11 @@ class TransformEditorTool(AppTool):
             self.app.inform.emit('[WARNING_NOTCL] %s...' % _("Offset Y cancelled"))
 
     def on_skewx_key(self):
-        val_box = FCInputDialog(title=_("Skew on X axis ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_skew_x']),
-                                parent=self.app.ui)
+        val_box = FCInputDoubleSpinner(title=_("Skew on X axis ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_skew_x']),
+                                       parent=self.app.ui)
         val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewX.png'))
 
         val, ok = val_box.get_value()
@@ -6408,11 +6416,11 @@ class TransformEditorTool(AppTool):
             self.app.inform.emit('[WARNING_NOTCL] %s...' % _("Skew X cancelled"))
 
     def on_skewy_key(self):
-        val_box = FCInputDialog(title=_("Skew on Y axis ..."),
-                                text='%s:' % _('Enter an Angle Value (degrees)'),
-                                min=-359.9999, max=360.0000, decimals=self.decimals,
-                                init_val=float(self.app.defaults['tools_transform_skew_y']),
-                                parent=self.app.ui)
+        val_box = FCInputDoubleSpinner(title=_("Skew on Y axis ..."),
+                                       text='%s:' % _('Enter an Angle Value (degrees)'),
+                                       min=-359.9999, max=360.0000, decimals=self.decimals,
+                                       init_val=float(self.app.defaults['tools_transform_skew_y']),
+                                       parent=self.app.ui)
         val_box.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/skewY.png'))
 
         val, ok = val_box.get_value()

+ 93 - 0
appGUI/GUIElements.py

@@ -2220,6 +2220,84 @@ class FCInputDialog(QtWidgets.QInputDialog):
         pass
 
 
+class FCInputDoubleSpinner(QtWidgets.QDialog):
+    def __init__(self, parent=None, title=None, text=None,
+                 min=0.0, max=100.0000, step=1, decimals=4, init_val=None):
+        super(FCInputDoubleSpinner, self).__init__(parent)
+
+        self.val = 0.0
+
+        self.init_value = init_val if init_val else 0.0
+
+        self.setWindowTitle(title) if title else self.setWindowTitle('title')
+        self.text = text if text else 'text'
+
+        self.min = min
+        self.max = max
+        self.step = step
+        self.decimals = decimals
+
+        self.lbl = FCLabel(self.text)
+
+        if title is None:
+            self.title = 'title'
+        else:
+            self.title = title
+        if text is None:
+            self.text = 'text'
+        else:
+            self.text = text
+
+        self.wdg = FCDoubleSpinner()
+        self.wdg.set_value(self.init_value)
+
+        QBtn = QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel
+
+        self.buttonBox = QtWidgets.QDialogButtonBox(QBtn)
+        self.buttonBox.accepted.connect(self.accept)
+        self.buttonBox.rejected.connect(self.reject)
+
+        self.layout = QtWidgets.QVBoxLayout()
+        self.layout.addWidget(self.lbl)
+        self.layout.addWidget(self.wdg)
+        self.layout.addWidget(self.buttonBox)
+
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
+        self.setLayout(self.layout)
+
+    def set_title(self, txt):
+        self.setWindowTitle(txt)
+
+    def set_text(self, txt):
+        self.lbl.set_value(txt)
+
+    def set_icon(self, icon):
+        self.setWindowIcon(icon)
+
+    def set_min(self, val):
+        self.wdg.setMinimum(val)
+
+    def set_max(self, val):
+        self.wdg.setMaximum(val)
+
+    def set_range(self, min, max):
+        self.wdg.set_range(min, max)
+
+    def set_step(self, val):
+        self.wdg.set_step(val)
+
+    def set_value(self, val):
+        self.wdg.set_value(val)
+
+    def get_value(self):
+        if self.exec_() == QtWidgets.QDialog.Accepted:
+            return self.wdg.get_value(), True
+        else:
+            return None, False
+
+
 class FCInputSpinner(QtWidgets.QDialog):
     def __init__(self, parent=None, title=None, text=None, min=None, max=None, decimals=4, step=1, init_val=None):
         super().__init__(parent)
@@ -2253,6 +2331,9 @@ class FCInputSpinner(QtWidgets.QDialog):
         self.buttonBox.accepted.connect(self.accept)
         self.buttonBox.rejected.connect(self.reject)
 
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
         self.layout = QtWidgets.QVBoxLayout()
         self.layout.addWidget(self.lbl)
         self.layout.addWidget(self.wdg)
@@ -2311,6 +2392,9 @@ class FCInputDialogSlider(QtWidgets.QDialog):
         self.buttonBox.accepted.connect(self.accept)
         self.buttonBox.rejected.connect(self.reject)
 
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
         self.layout = QtWidgets.QVBoxLayout()
         self.layout.addWidget(self.lbl)
         self.layout.addWidget(self.wdg)
@@ -2372,6 +2456,9 @@ class FCInputDialogSpinnerButton(QtWidgets.QDialog):
         self.buttonBox.accepted.connect(self.accept)
         self.buttonBox.rejected.connect(self.reject)
 
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
         self.layout = QtWidgets.QVBoxLayout()
         self.layout.addWidget(self.lbl)
         self.layout.addWidget(self.wdg)
@@ -2384,6 +2471,9 @@ class FCInputDialogSpinnerButton(QtWidgets.QDialog):
     def set_text(self, txt):
         self.lbl.set_value(txt)
 
+    def set_icon(self, icon):
+        self.setWindowIcon(icon)
+
     def set_min(self, val):
         self.wdg.spinner.setMinimum(val)
 
@@ -3708,6 +3798,9 @@ class DialogBoxRadio(QtWidgets.QDialog):
                                                      orientation=Qt.Horizontal, parent=self)
         self.form.addRow(self.button_box)
 
+        self.button_box.button(QtWidgets.QDialogButtonBox.Ok).setText(_("Ok"))
+        self.button_box.button(QtWidgets.QDialogButtonBox.Cancel).setText(_("Cancel"))
+
         self.button_box.accepted.connect(self.accept)
         self.button_box.rejected.connect(self.reject)
 

+ 18 - 18
appGUI/MainGUI.py

@@ -1224,18 +1224,18 @@ class MainGUI(QtWidgets.QMainWindow):
         self.grid_gap_x_entry.setToolTip(_("Grid X snapping distance"))
         self.grid_toolbar.addWidget(self.grid_gap_x_entry)
 
-        self.grid_toolbar.addWidget(QtWidgets.QLabel(" "))
+        self.grid_toolbar.addWidget(FCLabel(" "))
         self.grid_gap_link_cb = FCCheckBox()
         self.grid_gap_link_cb.setToolTip(_("When active, value on Grid_X\n"
                                            "is copied to the Grid_Y value."))
         self.grid_toolbar.addWidget(self.grid_gap_link_cb)
-        self.grid_toolbar.addWidget(QtWidgets.QLabel(" "))
+        self.grid_toolbar.addWidget(FCLabel(" "))
 
         self.grid_gap_y_entry = FCEntry2()
         self.grid_gap_y_entry.setMaximumWidth(70)
         self.grid_gap_y_entry.setToolTip(_("Grid Y snapping distance"))
         self.grid_toolbar.addWidget(self.grid_gap_y_entry)
-        self.grid_toolbar.addWidget(QtWidgets.QLabel(" "))
+        self.grid_toolbar.addWidget(FCLabel(" "))
 
         self.ois_grid = OptionalInputSection(self.grid_gap_link_cb, [self.grid_gap_y_entry], logic=False)
 
@@ -1257,25 +1257,25 @@ class MainGUI(QtWidgets.QMainWindow):
         self.axis_status_label.setToolTip(_("Toggle the display of axis on canvas"))
         self.axis_status_label.setPixmap(QtGui.QPixmap(self.app.resource_location + '/axis16.png'))
         self.status_toolbar.addWidget(self.axis_status_label)
-        self.status_toolbar.addWidget(QtWidgets.QLabel(" "))
+        self.status_toolbar.addWidget(FCLabel(" "))
 
         self.pref_status_label = FCLabel()
         self.pref_status_label.setToolTip(_("Preferences"))
         self.pref_status_label.setPixmap(QtGui.QPixmap(self.app.resource_location + '/settings18.png'))
         self.status_toolbar.addWidget(self.pref_status_label)
-        self.status_toolbar.addWidget(QtWidgets.QLabel(" "))
+        self.status_toolbar.addWidget(FCLabel(" "))
 
         self.shell_status_label = FCLabel()
         self.shell_status_label.setToolTip(_("Command Line"))
         self.shell_status_label.setPixmap(QtGui.QPixmap(self.app.resource_location + '/shell20.png'))
         self.status_toolbar.addWidget(self.shell_status_label)
-        self.status_toolbar.addWidget(QtWidgets.QLabel(" "))
+        self.status_toolbar.addWidget(FCLabel(" "))
 
         self.hud_label = FCLabel()
         self.hud_label.setToolTip(_("HUD (Heads up display)"))
         self.hud_label.setPixmap(QtGui.QPixmap(self.app.resource_location + '/hud16.png'))
         self.status_toolbar.addWidget(self.hud_label)
-        self.status_toolbar.addWidget(QtWidgets.QLabel(" "))
+        self.status_toolbar.addWidget(FCLabel(" "))
 
         self.wplace_label = FCLabel("A4")
         self.wplace_label.setToolTip(_("Draw a delimiting rectangle on canvas.\n"
@@ -1283,12 +1283,12 @@ class MainGUI(QtWidgets.QMainWindow):
                                      )
         self.wplace_label.setMargin(2)
         self.status_toolbar.addWidget(self.wplace_label)
-        self.status_toolbar.addWidget(QtWidgets.QLabel(" "))
+        self.status_toolbar.addWidget(FCLabel(" "))
 
         # #######################################################################
         # ####################### Delta Coordinates TOOLBAR #####################
         # #######################################################################
-        self.rel_position_label = QtWidgets.QLabel(
+        self.rel_position_label = FCLabel(
             "<b>Dx</b>: 0.0000&nbsp;&nbsp;   <b>Dy</b>: 0.0000&nbsp;&nbsp;&nbsp;&nbsp;")
         self.rel_position_label.setMinimumWidth(110)
         self.rel_position_label.setToolTip(_("Relative measurement.\nReference is last click position"))
@@ -1297,7 +1297,7 @@ class MainGUI(QtWidgets.QMainWindow):
         # #######################################################################
         # ####################### Coordinates TOOLBAR ###########################
         # #######################################################################
-        self.position_label = QtWidgets.QLabel("&nbsp;<b>X</b>: 0.0000&nbsp;&nbsp;   <b>Y</b>: 0.0000&nbsp;")
+        self.position_label = FCLabel("&nbsp;<b>X</b>: 0.0000&nbsp;&nbsp;   <b>Y</b>: 0.0000&nbsp;")
         self.position_label.setMinimumWidth(110)
         self.position_label.setToolTip(_("Absolute measurement.\n"
                                          "Reference is (X=0, Y= 0) position"))
@@ -1508,7 +1508,7 @@ class MainGUI(QtWidgets.QMainWindow):
               "to the initial values loaded after first launch."))
         self.pref_tab_bottom_layout_1.addWidget(self.pref_defaults_button)
 
-        self.pref_open_button = QtWidgets.QPushButton()
+        self.pref_open_button = FCButton()
         self.pref_open_button.setText(_("Open Pref Folder"))
         self.pref_open_button.setIcon(QtGui.QIcon(self.app.resource_location + '/pref.png'))
         self.pref_open_button.setMinimumWidth(130)
@@ -1540,7 +1540,7 @@ class MainGUI(QtWidgets.QMainWindow):
             _("Apply the current preferences without saving to a file."))
         self.pref_tab_bottom_layout_2.addWidget(self.pref_apply_button)
 
-        self.pref_save_button = QtWidgets.QPushButton()
+        self.pref_save_button = FCButton()
         self.pref_save_button.setIcon(QtGui.QIcon(self.app.resource_location + '/save_as.png'))
         self.pref_save_button.setText(_("Save"))
         self.pref_save_button.setMinimumWidth(130)
@@ -1549,7 +1549,7 @@ class MainGUI(QtWidgets.QMainWindow):
               "which is the file storing the working default preferences."))
         self.pref_tab_bottom_layout_2.addWidget(self.pref_save_button)
 
-        self.pref_close_button = QtWidgets.QPushButton()
+        self.pref_close_button = FCButton()
         self.pref_close_button.setText(_("Cancel"))
         self.pref_close_button.setMinimumWidth(130)
         self.pref_close_button.setToolTip(
@@ -1723,7 +1723,7 @@ class MainGUI(QtWidgets.QMainWindow):
         self.infobar.addWidget(self.status_toolbar)
         self.status_toolbar.setVisible(self.app.defaults["global_statusbar_show"])
 
-        self.units_label = QtWidgets.QLabel("[mm]")
+        self.units_label = FCLabel("[mm]")
         self.units_label.setToolTip(_("Application units"))
         self.units_label.setMargin(2)
         self.infobar.addWidget(self.units_label)
@@ -3646,10 +3646,10 @@ class MainGUI(QtWidgets.QMainWindow):
                         self.app.exc_editor.launched_from_shortcuts = True
                         # ## Current application units in Upper Case
                         self.units = self.general_defaults_form.general_app_group.units_radio.get_value().upper()
-                        tool_add_popup = FCInputDialog(title='%s ...' % _("New Tool"),
-                                                       text='%s:' % _('Enter a Tool Diameter'),
-                                                       min=0.0000, max=99.9999, decimals=4)
-                        tool_add_popup.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/letter_t_32.png'))
+                        tool_add_popup = FCInputDoubleSpinner(title='%s ...' % _("New Tool"),
+                                                              text='%s:' % _('Enter a Tool Diameter'),
+                                                              min=0.0000, max=99.9999, decimals=self.decimals)
+                        tool_add_popup.set_icon(QtGui.QIcon(self.app.resource_location + '/letter_t_32.png'))
 
                         val, ok = tool_add_popup.get_value()
                         if ok:

+ 99 - 99
appGUI/ObjectUI.py

@@ -62,17 +62,17 @@ class ObjectUI(QtWidgets.QWidget):
 
         # ## Page Title icon
         pixmap = QtGui.QPixmap(icon_file.replace('assets/resources', self.resource_loc))
-        self.icon = QtWidgets.QLabel()
+        self.icon = FCLabel()
         self.icon.setPixmap(pixmap)
         self.title_box.addWidget(self.icon, stretch=0)
 
         # ## Title label
-        self.title_label = QtWidgets.QLabel("<font size=5><b>%s</b></font>" % title)
+        self.title_label = FCLabel("<font size=5><b>%s</b></font>" % title)
         self.title_label.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
         self.title_box.addWidget(self.title_label, stretch=1)
 
         # ## App Level label
-        self.level = QtWidgets.QLabel("")
+        self.level = FCLabel("")
         self.level.setToolTip(
             _(
                 "BASIC is suitable for a beginner. Many parameters\n"
@@ -100,13 +100,13 @@ class ObjectUI(QtWidgets.QWidget):
             self.common_grid.setColumnStretch(1, 0)
             layout.addLayout(self.common_grid)
 
-            # self.common_grid.addWidget(QtWidgets.QLabel(''), 1, 0, 1, 2)
+            # self.common_grid.addWidget(FCLabel(''), 1, 0, 1, 2)
             separator_line = QtWidgets.QFrame()
             separator_line.setFrameShape(QtWidgets.QFrame.HLine)
             separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
             self.common_grid.addWidget(separator_line, 1, 0, 1, 2)
 
-            self.transform_label = QtWidgets.QLabel('<b>%s</b>' % _('Transformations'))
+            self.transform_label = FCLabel('<b>%s</b>' % _('Transformations'))
             self.transform_label.setToolTip(
                 _("Geometrical transformations of the current object.")
             )
@@ -122,7 +122,7 @@ class ObjectUI(QtWidgets.QWidget):
                   "Expressions are allowed. E.g: 1/25.4")
             )
             # GO Button
-            self.scale_button = QtWidgets.QPushButton(_('Scale'))
+            self.scale_button = FCButton(_('Scale'))
             self.scale_button.setToolTip(
                 _("Perform scaling operation.")
             )
@@ -140,7 +140,7 @@ class ObjectUI(QtWidgets.QWidget):
                   "Expressions are allowed. E.g: (1/3.2, 0.5*3)")
             )
 
-            self.offset_button = QtWidgets.QPushButton(_('Offset'))
+            self.offset_button = FCButton(_('Offset'))
             self.offset_button.setToolTip(
                 _("Perform the offset operation.")
             )
@@ -149,7 +149,7 @@ class ObjectUI(QtWidgets.QWidget):
             self.common_grid.addWidget(self.offsetvector_entry, 4, 0)
             self.common_grid.addWidget(self.offset_button, 4, 1)
 
-            self.transformations_button = QtWidgets.QPushButton(_('Transformations'))
+            self.transformations_button = FCButton(_('Transformations'))
             self.transformations_button.setIcon(QtGui.QIcon(self.app.resource_location + '/transform.png'))
             self.transformations_button.setToolTip(
                 _("Geometrical transformations of the current object.")
@@ -194,7 +194,7 @@ class GerberObjectUI(ObjectUI):
         grid0.setColumnStretch(0, 0)
         grid0.setColumnStretch(1, 1)
 
-        self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
+        self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
 
         grid0.addWidget(self.plot_options_label, 0, 0)
 
@@ -216,7 +216,7 @@ class GerberObjectUI(ObjectUI):
         self.name_hlay = QtWidgets.QHBoxLayout()
         grid0.addLayout(self.name_hlay, 1, 0, 1, 3)
 
-        name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
+        name_label = FCLabel("<b>%s:</b>" % _("Name"))
         self.name_entry = FCEntry()
         self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
         self.name_hlay.addWidget(name_label)
@@ -238,7 +238,7 @@ class GerberObjectUI(ObjectUI):
         grid0.addWidget(self.follow_cb, 2, 2)
 
         # Editor
-        self.editor_button = QtWidgets.QPushButton(_('Gerber Editor'))
+        self.editor_button = FCButton(_('Gerber Editor'))
         self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
         self.editor_button.setToolTip(
             _("Start the Object Editor")
@@ -278,7 +278,7 @@ class GerberObjectUI(ObjectUI):
         self.properties_box.setStretch(0, 0)
 
         # ### Gerber Apertures ####
-        self.apertures_table_label = QtWidgets.QLabel('%s:' % _('Apertures'))
+        self.apertures_table_label = FCLabel('%s:' % _('Apertures'))
         self.apertures_table_label.setToolTip(
             _("Apertures Table for the Gerber Object.")
         )
@@ -336,7 +336,7 @@ class GerberObjectUI(ObjectUI):
         self.apertures_table.setVisible(False)
 
         # Buffer Geometry
-        self.create_buffer_button = QtWidgets.QPushButton(_('Buffer Solid Geometry'))
+        self.create_buffer_button = FCButton(_('Buffer Solid Geometry'))
         self.create_buffer_button.setToolTip(
             _("This button is shown only when the Gerber file\n"
               "is loaded without buffering.\n"
@@ -350,11 +350,11 @@ class GerberObjectUI(ObjectUI):
         separator_line1.setFrameShadow(QtWidgets.QFrame.Sunken)
         grid0.addWidget(separator_line1, 13, 0, 1, 3)
 
-        self.tool_lbl = QtWidgets.QLabel('<b>%s</b>' % _("TOOLS"))
+        self.tool_lbl = FCLabel('<b>%s</b>' % _("TOOLS"))
         grid0.addWidget(self.tool_lbl, 14, 0, 1, 3)
 
         # Isolation Tool - will create isolation paths around the copper features
-        self.iso_button = QtWidgets.QPushButton(_('Isolation Routing'))
+        self.iso_button = FCButton(_('Isolation Routing'))
         # self.iso_button.setIcon(QtGui.QIcon(self.app.resource_location + '/iso_16.png'))
         self.iso_button.setToolTip(
             _("Create a Geometry object with\n"
@@ -369,7 +369,7 @@ class GerberObjectUI(ObjectUI):
         grid0.addWidget(self.iso_button, 16, 0, 1, 3)
 
         # ## Clear non-copper regions
-        self.generate_ncc_button = QtWidgets.QPushButton(_('NCC Tool'))
+        self.generate_ncc_button = FCButton(_('NCC Tool'))
         self.generate_ncc_button.setIcon(QtGui.QIcon(self.app.resource_location + '/eraser26.png'))
         self.generate_ncc_button.setToolTip(
             _("Create the Geometry Object\n"
@@ -384,7 +384,7 @@ class GerberObjectUI(ObjectUI):
         grid0.addWidget(self.generate_ncc_button, 18, 0, 1, 3)
 
         # ## Board cutout
-        self.generate_cutout_button = QtWidgets.QPushButton(_('Cutout Tool'))
+        self.generate_cutout_button = FCButton(_('Cutout Tool'))
         self.generate_cutout_button.setIcon(QtGui.QIcon(self.app.resource_location + '/cut32_bis.png'))
         self.generate_cutout_button.setToolTip(
             _("Generate the geometry for\n"
@@ -430,7 +430,7 @@ class GerberObjectUI(ObjectUI):
         self.util_box.addLayout(util_grid)
 
         # ## Non-copper regions
-        self.noncopper_label = QtWidgets.QLabel("<b>%s</b>" % _("Non-copper regions"))
+        self.noncopper_label = FCLabel("<b>%s</b>" % _("Non-copper regions"))
         self.noncopper_label.setToolTip(
             _("Create polygons covering the\n"
               "areas without copper on the PCB.\n"
@@ -442,7 +442,7 @@ class GerberObjectUI(ObjectUI):
         util_grid.addWidget(self.noncopper_label, 0, 0, 1, 3)
 
         # Margin
-        bmlabel = QtWidgets.QLabel('%s:' % _('Boundary Margin'))
+        bmlabel = FCLabel('%s:' % _('Boundary Margin'))
         bmlabel.setToolTip(
             _("Specify the edge of the PCB\n"
               "by drawing a box around all\n"
@@ -464,7 +464,7 @@ class GerberObjectUI(ObjectUI):
             _("Resulting geometry will have rounded corners.")
         )
 
-        self.generate_noncopper_button = QtWidgets.QPushButton(_('Generate Geometry'))
+        self.generate_noncopper_button = FCButton(_('Generate Geometry'))
         self.generate_noncopper_button.setIcon(QtGui.QIcon(self.app.resource_location + '/geometry32.png'))
         util_grid.addWidget(self.noncopper_rounded_cb, 4, 0)
         util_grid.addWidget(self.generate_noncopper_button, 4, 1, 1, 2)
@@ -475,7 +475,7 @@ class GerberObjectUI(ObjectUI):
         util_grid.addWidget(separator_line1, 6, 0, 1, 3)
 
         # ## Bounding box
-        self.boundingbox_label = QtWidgets.QLabel('<b>%s</b>' % _('Bounding Box'))
+        self.boundingbox_label = FCLabel('<b>%s</b>' % _('Bounding Box'))
         self.boundingbox_label.setToolTip(
             _("Create a geometry surrounding the Gerber object.\n"
               "Square shape.")
@@ -483,7 +483,7 @@ class GerberObjectUI(ObjectUI):
 
         util_grid.addWidget(self.boundingbox_label, 8, 0, 1, 3)
 
-        bbmargin = QtWidgets.QLabel('%s:' % _('Boundary Margin'))
+        bbmargin = FCLabel('%s:' % _('Boundary Margin'))
         bbmargin.setToolTip(
             _("Distance of the edges of the box\n"
               "to the nearest polygon.")
@@ -504,7 +504,7 @@ class GerberObjectUI(ObjectUI):
               "the margin.")
         )
 
-        self.generate_bb_button = QtWidgets.QPushButton(_('Generate Geometry'))
+        self.generate_bb_button = FCButton(_('Generate Geometry'))
         self.generate_bb_button.setIcon(QtGui.QIcon(self.app.resource_location + '/geometry32.png'))
         self.generate_bb_button.setToolTip(
             _("Generate the Geometry object.")
@@ -546,7 +546,7 @@ class ExcellonObjectUI(ObjectUI):
         self.custom_box.addLayout(grid0)
 
         # Plot options
-        self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
+        self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
 
         # Solid CB
         self.solid_cb = FCCheckBox(label=_('Solid'))
@@ -567,7 +567,7 @@ class ExcellonObjectUI(ObjectUI):
         # ## Object name
         self.name_hlay = QtWidgets.QHBoxLayout()
 
-        name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
+        name_label = FCLabel("<b>%s:</b>" % _("Name"))
         self.name_entry = FCEntry()
         self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
         self.name_hlay.addWidget(name_label)
@@ -576,7 +576,7 @@ class ExcellonObjectUI(ObjectUI):
         grid0.addLayout(self.name_hlay, 2, 0, 1, 3)
 
         # Editor
-        self.editor_button = QtWidgets.QPushButton(_('Excellon Editor'))
+        self.editor_button = FCButton(_('Excellon Editor'))
         self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
 
         self.editor_button.setToolTip(
@@ -617,7 +617,7 @@ class ExcellonObjectUI(ObjectUI):
         self.properties_box.setStretch(0, 0)
 
         # ### Tools Drills ####
-        self.tools_table_label = QtWidgets.QLabel('<b>%s</b>' % _('Tools Table'))
+        self.tools_table_label = FCLabel('<b>%s</b>' % _('Tools Table'))
         self.tools_table_label.setToolTip(
             _("Tools in this Excellon object\n"
               "when are used for drilling.")
@@ -714,11 +714,11 @@ class ExcellonObjectUI(ObjectUI):
         separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
         grid2.addWidget(separator_line, 0, 0, 1, 2)
 
-        self.tool_lbl = QtWidgets.QLabel('<b>%s</b>' % _("TOOLS"))
+        self.tool_lbl = FCLabel('<b>%s</b>' % _("TOOLS"))
         grid2.addWidget(self.tool_lbl, 2, 0, 1, 2)
 
         # Drilling Tool - will create GCode for drill holes
-        self.drill_button = QtWidgets.QPushButton(_('Drilling Tool'))
+        self.drill_button = FCButton(_('Drilling Tool'))
         self.drill_button.setIcon(QtGui.QIcon(self.app.resource_location + '/drilling_tool32.png'))
         self.drill_button.setToolTip(
             _("Generate GCode from the drill holes in an Excellon object.")
@@ -732,7 +732,7 @@ class ExcellonObjectUI(ObjectUI):
         grid2.addWidget(self.drill_button, 4, 0, 1, 2)
 
         # Milling Tool - will create GCode for slot holes
-        self.milling_button = QtWidgets.QPushButton(_('Milling Tool'))
+        self.milling_button = FCButton(_('Milling Tool'))
         self.milling_button.setIcon(QtGui.QIcon(self.app.resource_location + '/milling_tool32.png'))
         self.milling_button.setToolTip(
             _("Generate a Geometry for milling drills or slots in an Excellon object.")
@@ -779,7 +779,7 @@ class ExcellonObjectUI(ObjectUI):
         self.util_box.addLayout(util_grid)
 
         # ### Milling Holes Drills ####
-        self.mill_hole_label = QtWidgets.QLabel('<b>%s</b>' % _('Milling Geometry'))
+        self.mill_hole_label = FCLabel('<b>%s</b>' % _('Milling Geometry'))
         self.mill_hole_label.setToolTip(
             _("Create Geometry for milling holes.\n"
               "Select from the Tools Table above the hole dias to be\n"
@@ -787,7 +787,7 @@ class ExcellonObjectUI(ObjectUI):
         )
         util_grid.addWidget(self.mill_hole_label, 0, 0, 1, 3)
 
-        self.tdlabel = QtWidgets.QLabel('%s:' % _('Milling Diameter'))
+        self.tdlabel = FCLabel('%s:' % _('Milling Diameter'))
         self.tdlabel.setToolTip(
             _("Diameter of the cutting tool.")
         )
@@ -799,7 +799,7 @@ class ExcellonObjectUI(ObjectUI):
         self.tooldia_entry.set_range(0.0, 10000.0000)
         self.tooldia_entry.setSingleStep(0.1)
 
-        self.generate_milling_button = QtWidgets.QPushButton(_('Mill Drills'))
+        self.generate_milling_button = FCButton(_('Mill Drills'))
         self.generate_milling_button.setToolTip(
             _("Create the Geometry Object\n"
               "for milling drills.")
@@ -819,7 +819,7 @@ class ExcellonObjectUI(ObjectUI):
         self.slot_tooldia_entry.set_range(0.0, 10000.0000)
         self.slot_tooldia_entry.setSingleStep(0.1)
 
-        self.generate_milling_slots_button = QtWidgets.QPushButton(_('Mill Slots'))
+        self.generate_milling_slots_button = FCButton(_('Mill Slots'))
         self.generate_milling_slots_button.setToolTip(
             _("Create the Geometry Object\n"
               "for milling slots.")
@@ -874,7 +874,7 @@ class GeometryObjectUI(ObjectUI):
         grid_header.setColumnStretch(0, 0)
         grid_header.setColumnStretch(1, 1)
 
-        self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
+        self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
         self.plot_options_label.setMinimumWidth(90)
 
         grid_header.addWidget(self.plot_options_label, 0, 0)
@@ -891,14 +891,14 @@ class GeometryObjectUI(ObjectUI):
         self.name_hlay = QtWidgets.QHBoxLayout()
         grid_header.addLayout(self.name_hlay, 2, 0, 1, 3)
 
-        name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
+        name_label = FCLabel("<b>%s:</b>" % _("Name"))
         self.name_entry = FCEntry()
         self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
         self.name_hlay.addWidget(name_label)
         self.name_hlay.addWidget(self.name_entry)
 
         # Editor
-        self.editor_button = QtWidgets.QPushButton(_('Geometry Editor'))
+        self.editor_button = FCButton(_('Geometry Editor'))
         self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
 
         self.editor_button.setToolTip(
@@ -964,7 +964,7 @@ class GeometryObjectUI(ObjectUI):
         grid0.setColumnStretch(1, 1)
 
         # ### Tools ####
-        self.tools_table_label = QtWidgets.QLabel('<b>%s:</b>' % _('Tools Table'))
+        self.tools_table_label = FCLabel('<b>%s:</b>' % _('Tools Table'))
         self.tools_table_label.setToolTip(
             _("Tools in this Geometry object used for cutting.\n"
               "The 'Offset' entry will set an offset for the cut.\n"
@@ -1052,7 +1052,7 @@ class GeometryObjectUI(ObjectUI):
         grid1.setColumnStretch(0, 0)
         grid1.setColumnStretch(1, 1)
 
-        self.tool_offset_lbl = QtWidgets.QLabel('%s:' % _('Tool Offset'))
+        self.tool_offset_lbl = FCLabel('%s:' % _('Tool Offset'))
         self.tool_offset_lbl.setToolTip(
             _(
                 "The value to offset the cut when \n"
@@ -1074,10 +1074,10 @@ class GeometryObjectUI(ObjectUI):
         separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
         grid1.addWidget(separator_line, 1, 0, 1, 2)
 
-        self.tool_sel_label = QtWidgets.QLabel('<b>%s</b>' % _("Add from DB"))
+        self.tool_sel_label = FCLabel('<b>%s</b>' % _("Add from DB"))
         grid1.addWidget(self.tool_sel_label, 2, 0, 1, 2)
 
-        self.addtool_entry_lbl = QtWidgets.QLabel('%s:' % _('Tool Dia'))
+        self.addtool_entry_lbl = FCLabel('%s:' % _('Tool Dia'))
         self.addtool_entry_lbl.setToolTip(
             _("Diameter for the new tool")
         )
@@ -1091,14 +1091,14 @@ class GeometryObjectUI(ObjectUI):
 
         bhlay = QtWidgets.QHBoxLayout()
 
-        self.search_and_add_btn = QtWidgets.QPushButton(_('Search and Add'))
+        self.search_and_add_btn = FCButton(_('Search and Add'))
         self.search_and_add_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
         self.search_and_add_btn.setToolTip(
             _("Add a new tool to the Tool Table\n"
               "with the diameter specified above.")
         )
 
-        self.addtool_from_db_btn = QtWidgets.QPushButton(_('Pick from DB'))
+        self.addtool_from_db_btn = FCButton(_('Pick from DB'))
         self.addtool_from_db_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/search_db32.png'))
         self.addtool_from_db_btn.setToolTip(
             _("Add a new tool to the Tool Table\n"
@@ -1120,7 +1120,7 @@ class GeometryObjectUI(ObjectUI):
         grid2 = QtWidgets.QGridLayout()
         self.geo_table_box.addLayout(grid2)
 
-        self.deltool_btn = QtWidgets.QPushButton(_('Delete'))
+        self.deltool_btn = FCButton(_('Delete'))
         self.deltool_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/trash16.png'))
         self.deltool_btn.setToolTip(
             _("Delete a selection of tools in the Tool Table\n"
@@ -1155,7 +1155,7 @@ class GeometryObjectUI(ObjectUI):
         self.geo_param_box.addLayout(self.grid3)
 
         # ### Tools Data ## ##
-        self.tool_data_label = QtWidgets.QLabel(
+        self.tool_data_label = FCLabel(
             "<b>%s: <font color='#0000FF'>%s %d</font></b>" % (_('Parameters for'), _("Tool"), int(1)))
         self.tool_data_label.setToolTip(
             _(
@@ -1166,7 +1166,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.tool_data_label, 0, 0, 1, 2)
 
         # Tip Dia
-        self.tipdialabel = QtWidgets.QLabel('%s:' % _('V-Tip Dia'))
+        self.tipdialabel = FCLabel('%s:' % _('V-Tip Dia'))
         self.tipdialabel.setToolTip(
             _(
                 "The tip diameter for V-Shape Tool"
@@ -1181,7 +1181,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.tipdia_entry, 1, 1)
 
         # Tip Angle
-        self.tipanglelabel = QtWidgets.QLabel('%s:' % _('V-Tip Angle'))
+        self.tipanglelabel = FCLabel('%s:' % _('V-Tip Angle'))
         self.tipanglelabel.setToolTip(
             _(
                 "The tip angle for V-Shape Tool.\n"
@@ -1197,7 +1197,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.tipangle_entry, 2, 1)
 
         # Cut Z
-        self.cutzlabel = QtWidgets.QLabel('%s:' % _('Cut Z'))
+        self.cutzlabel = FCLabel('%s:' % _('Cut Z'))
         self.cutzlabel.setToolTip(
             _(
                 "Cutting depth (negative)\n"
@@ -1244,7 +1244,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.maxdepth_entry, 4, 1)
 
         # Travel Z
-        self.travelzlabel = QtWidgets.QLabel('%s:' % _('Travel Z'))
+        self.travelzlabel = FCLabel('%s:' % _('Travel Z'))
         self.travelzlabel.setToolTip(
             _("Height of the tool when\n"
               "moving without cutting.")
@@ -1263,7 +1263,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.travelz_entry, 5, 1)
 
         # Feedrate X-Y
-        self.frlabel = QtWidgets.QLabel('%s:' % _('Feedrate X-Y'))
+        self.frlabel = FCLabel('%s:' % _('Feedrate X-Y'))
         self.frlabel.setToolTip(
             _("Cutting speed in the XY\n"
               "plane in units per minute")
@@ -1277,7 +1277,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.cncfeedrate_entry, 10, 1)
 
         # Feedrate Z (Plunge)
-        self.frzlabel = QtWidgets.QLabel('%s:' % _('Feedrate Z'))
+        self.frzlabel = FCLabel('%s:' % _('Feedrate Z'))
         self.frzlabel.setToolTip(
             _("Cutting speed in the XY\n"
               "plane in units per minute.\n"
@@ -1292,7 +1292,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.feedrate_z_entry, 11, 1)
 
         # Feedrate rapids
-        self.fr_rapidlabel = QtWidgets.QLabel('%s:' % _('Feedrate Rapids'))
+        self.fr_rapidlabel = FCLabel('%s:' % _('Feedrate Rapids'))
         self.fr_rapidlabel.setToolTip(
             _("Cutting speed in the XY plane\n"
               "(in units per minute).\n"
@@ -1335,7 +1335,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.e_cut_entry, 13, 1)
 
         # Spindlespeed
-        self.spindle_label = QtWidgets.QLabel('%s:' % _('Spindle speed'))
+        self.spindle_label = FCLabel('%s:' % _('Spindle speed'))
         self.spindle_label.setToolTip(
             _(
                 "Speed of the spindle in RPM (optional).\n"
@@ -1372,7 +1372,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.dwelltime_entry, 15, 1)
 
         # Probe depth
-        self.pdepth_label = QtWidgets.QLabel('%s:' % _("Probe Z depth"))
+        self.pdepth_label = FCLabel('%s:' % _("Probe Z depth"))
         self.pdepth_label.setToolTip(
             _("The maximum depth that the probe is allowed\n"
               "to probe. Negative value, in current units.")
@@ -1389,7 +1389,7 @@ class GeometryObjectUI(ObjectUI):
         self.pdepth_entry.setVisible(False)
 
         # Probe feedrate
-        self.feedrate_probe_label = QtWidgets.QLabel('%s:' % _("Feedrate Probe"))
+        self.feedrate_probe_label = FCLabel('%s:' % _("Feedrate Probe"))
         self.feedrate_probe_label.setToolTip(
             _("The feedrate used while the probe is probing.")
         )
@@ -1432,7 +1432,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(separator_line2, 2, 0, 1, 2)
 
         # General Parameters
-        self.gen_param_label = QtWidgets.QLabel('<b>%s</b>' % _("Common Parameters"))
+        self.gen_param_label = FCLabel('<b>%s</b>' % _("Common Parameters"))
         self.gen_param_label.setToolTip(
             _("Parameters that are common for all tools.")
         )
@@ -1467,7 +1467,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.toolchangez_entry, 6, 1)
 
         # The Z value for the start move
-        # startzlabel = QtWidgets.QLabel('Start move Z:')
+        # startzlabel = FCLabel('Start move Z:')
         # startzlabel.setToolTip(
         #     "Tool height just before starting the work.\n"
         #     "Delete the value if you don't need this feature."
@@ -1478,7 +1478,7 @@ class GeometryObjectUI(ObjectUI):
         # grid3.addWidget(self.gstartz_entry, 8, 1)
 
         # The Z value for the end move
-        self.endz_label = QtWidgets.QLabel('%s:' % _('End move Z'))
+        self.endz_label = FCLabel('%s:' % _('End move Z'))
         self.endz_label.setToolTip(
             _("Height of the tool after\n"
               "the last move at the end of the job.")
@@ -1497,7 +1497,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.endz_entry, 9, 1)
 
         # End Move X,Y
-        endmove_xy_label = QtWidgets.QLabel('%s:' % _('End move X,Y'))
+        endmove_xy_label = FCLabel('%s:' % _('End move X,Y'))
         endmove_xy_label.setToolTip(
             _("End move X,Y position. In format (x,y).\n"
               "If no value is entered then there is no move\n"
@@ -1510,7 +1510,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.endxy_entry, 10, 1)
 
         # preprocessor selection
-        pp_label = QtWidgets.QLabel('%s:' % _("Preprocessor"))
+        pp_label = FCLabel('%s:' % _("Preprocessor"))
         pp_label.setToolTip(
             _("The Preprocessor file that dictates\n"
               "the Machine Code (like GCode, RML, HPGL) output.")
@@ -1521,7 +1521,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(pp_label, 11, 0)
         self.grid4.addWidget(self.pp_geometry_name_cb, 11, 1)
 
-        # self.grid4.addWidget(QtWidgets.QLabel(''), 12, 0, 1, 2)
+        # self.grid4.addWidget(FCLabel(''), 12, 0, 1, 2)
 
         # ------------------------------------------------------------------------------------------------------------
         # ------------------------- EXCLUSION AREAS ------------------------------------------------------------------
@@ -1594,7 +1594,7 @@ class GeometryObjectUI(ObjectUI):
         grid_a1.addWidget(self.over_z_entry, 2, 1)
 
         # Button Add Area
-        self.add_area_button = QtWidgets.QPushButton(_('Add Area:'))
+        self.add_area_button = FCButton(_('Add Area:'))
         self.add_area_button.setToolTip(_("Add an Exclusion Area."))
 
         # Area Selection shape
@@ -1611,11 +1611,11 @@ class GeometryObjectUI(ObjectUI):
         self.exclusion_box.addLayout(h_lay_1)
 
         # Button Delete All Areas
-        self.delete_area_button = QtWidgets.QPushButton(_('Delete All'))
+        self.delete_area_button = FCButton(_('Delete All'))
         self.delete_area_button.setToolTip(_("Delete all exclusion areas."))
 
         # Button Delete Selected Areas
-        self.delete_sel_area_button = QtWidgets.QPushButton(_('Delete Selected'))
+        self.delete_sel_area_button = FCButton(_('Delete Selected'))
         self.delete_sel_area_button.setToolTip(_("Delete all exclusion areas that are selected in the table."))
 
         h_lay_1.addWidget(self.delete_area_button)
@@ -1634,7 +1634,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.polish_cb, 15, 0, 1, 2)
 
         # Polish Tool Diameter
-        self.polish_dia_lbl = QtWidgets.QLabel('%s:' % _('Tool Dia'))
+        self.polish_dia_lbl = FCLabel('%s:' % _('Tool Dia'))
         self.polish_dia_lbl.setToolTip(
             _("Diameter for the polishing tool.")
         )
@@ -1647,7 +1647,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.polish_dia_entry, 16, 1)
 
         # Polish Travel Z
-        self.polish_travelz_lbl = QtWidgets.QLabel('%s:' % _('Travel Z'))
+        self.polish_travelz_lbl = FCLabel('%s:' % _('Travel Z'))
         self.polish_travelz_lbl.setToolTip(
             _("Height of the tool when\n"
               "moving without cutting.")
@@ -1662,7 +1662,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.polish_travelz_entry, 17, 1)
 
         # Polish Pressure
-        self.polish_pressure_lbl = QtWidgets.QLabel('%s:' % _('Pressure'))
+        self.polish_pressure_lbl = FCLabel('%s:' % _('Pressure'))
         self.polish_pressure_lbl.setToolTip(
             _("Negative value. The higher the absolute value\n"
               "the stronger the pressure of the brush on the material.")
@@ -1689,7 +1689,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.polish_margin_entry, 20, 1)
 
         # Polish Overlap
-        self.polish_over_lbl = QtWidgets.QLabel('%s:' % _('Overlap'))
+        self.polish_over_lbl = FCLabel('%s:' % _('Overlap'))
         self.polish_over_lbl.setToolTip(
             _("How much (percentage) of the tool width to overlap each tool pass.")
         )
@@ -1704,7 +1704,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.polish_over_entry, 22, 1)
 
         # Polish Method
-        self.polish_method_lbl = QtWidgets.QLabel('%s:' % _('Method'))
+        self.polish_method_lbl = FCLabel('%s:' % _('Method'))
         self.polish_method_lbl.setToolTip(
             _("Algorithm for polishing:\n"
               "- Standard: Fixed step inwards.\n"
@@ -1758,7 +1758,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(separator_line2, 26, 0, 1, 2)
 
         # Button
-        self.generate_cnc_button = QtWidgets.QPushButton(_('Generate CNCJob object'))
+        self.generate_cnc_button = FCButton(_('Generate CNCJob object'))
         self.generate_cnc_button.setIcon(QtGui.QIcon(self.app.resource_location + '/cnc16.png'))
         self.generate_cnc_button.setToolTip('%s.\n%s' % (
             _("Generate CNCJob object"),
@@ -1775,19 +1775,19 @@ class GeometryObjectUI(ObjectUI):
                         """)
         self.grid4.addWidget(self.generate_cnc_button, 28, 0, 1, 2)
 
-        self.grid4.addWidget(QtWidgets.QLabel(''), 30, 0, 1, 2)
+        self.grid4.addWidget(FCLabel(''), 30, 0, 1, 2)
 
         # ##############
         # Paint area ##
         # ##############
-        self.tools_label = QtWidgets.QLabel('<b>%s</b>' % _('TOOLS'))
+        self.tools_label = FCLabel('<b>%s</b>' % _('TOOLS'))
         self.tools_label.setToolTip(
             _("Launch Paint Tool in Tools Tab.")
         )
         self.grid4.addWidget(self.tools_label, 32, 0, 1, 2)
 
         # Milling Tool - will create GCode for slot holes
-        self.milling_button = QtWidgets.QPushButton(_('Milling Tool'))
+        self.milling_button = FCButton(_('Milling Tool'))
         self.milling_button.setIcon(QtGui.QIcon(self.app.resource_location + '/milling_tool32.png'))
         self.milling_button.setToolTip(
             _("Generate a CNCJob by milling a Geometry.")
@@ -1803,7 +1803,7 @@ class GeometryObjectUI(ObjectUI):
         self.milling_button.setDisabled(True)
 
         # Paint Button
-        self.paint_tool_button = QtWidgets.QPushButton(_('Paint Tool'))
+        self.paint_tool_button = FCButton(_('Paint Tool'))
         self.paint_tool_button.setIcon(QtGui.QIcon(self.app.resource_location + '/paint20_1.png'))
         self.paint_tool_button.setToolTip(
             _("Creates tool paths to cover the\n"
@@ -1819,7 +1819,7 @@ class GeometryObjectUI(ObjectUI):
         self.grid4.addWidget(self.paint_tool_button, 36, 0, 1, 2)
 
         # NCC Tool
-        self.generate_ncc_button = QtWidgets.QPushButton(_('NCC Tool'))
+        self.generate_ncc_button = FCButton(_('NCC Tool'))
         self.generate_ncc_button.setIcon(QtGui.QIcon(self.app.resource_location + '/eraser26.png'))
         self.generate_ncc_button.setToolTip(
             _("Create the Geometry Object\n"
@@ -1873,7 +1873,7 @@ class CNCObjectUI(ObjectUI):
         self.custom_box.addLayout(f_lay)
 
         # Plot Options
-        self.cncplot_method_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
+        self.cncplot_method_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
         self.cncplot_method_label.setToolTip(
             _(
                 "This selects the kind of geometries on the canvas to plot.\n"
@@ -1896,7 +1896,7 @@ class CNCObjectUI(ObjectUI):
         f_lay.addLayout(self.name_hlay, 2, 0, 1, 3)
 
         # ## Object name
-        name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
+        name_label = FCLabel("<b>%s:</b>" % _("Name"))
         self.name_entry = FCEntry()
         self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
 
@@ -1959,26 +1959,26 @@ class CNCObjectUI(ObjectUI):
         f_lay.addWidget(separator_line, 10, 0, 1, 3)
 
         # Travelled Distance
-        self.t_distance_label = QtWidgets.QLabel("<b>%s:</b>" % _("Travelled distance"))
+        self.t_distance_label = FCLabel("<b>%s:</b>" % _("Travelled distance"))
         self.t_distance_label.setToolTip(
             _("This is the total travelled distance on X-Y plane.\n"
               "In current units.")
         )
         self.t_distance_entry = FCEntry()
-        self.units_label = QtWidgets.QLabel()
+        self.units_label = FCLabel()
 
         f_lay.addWidget(self.t_distance_label, 12, 0)
         f_lay.addWidget(self.t_distance_entry, 12, 1)
         f_lay.addWidget(self.units_label, 12, 2)
 
         # Estimated Time
-        self.t_time_label = QtWidgets.QLabel("<b>%s:</b>" % _("Estimated time"))
+        self.t_time_label = FCLabel("<b>%s:</b>" % _("Estimated time"))
         self.t_time_label.setToolTip(
             _("This is the estimated time to do the routing/drilling,\n"
               "without the time spent in ToolChange events.")
         )
         self.t_time_entry = FCEntry()
-        self.units_time_label = QtWidgets.QLabel()
+        self.units_time_label = FCLabel()
 
         f_lay.addWidget(self.t_time_label, 14, 0)
         f_lay.addWidget(self.t_time_entry, 14, 1)
@@ -1998,7 +1998,7 @@ class CNCObjectUI(ObjectUI):
         self.custom_box.addLayout(hlay)
 
         # CNC Tools Table for plot
-        self.cnc_tools_table_label = QtWidgets.QLabel('<b>%s</b>' % _('CNC Tools Table'))
+        self.cnc_tools_table_label = FCLabel('<b>%s</b>' % _('CNC Tools Table'))
         self.cnc_tools_table_label.setToolTip(
             _(
                 "Tools in this CNCJob object used for cutting.\n"
@@ -2050,7 +2050,7 @@ class CNCObjectUI(ObjectUI):
         self.custom_box.addWidget(self.tooldia_entry)
 
         # Update plot button
-        self.updateplot_button = QtWidgets.QPushButton(_('Update Plot'))
+        self.updateplot_button = FCButton(_('Update Plot'))
         self.updateplot_button.setToolTip(
             _("Update the plot.")
         )
@@ -2148,7 +2148,7 @@ class CNCObjectUI(ObjectUI):
         grid0.addWidget(self.probe_gc_label, 7, 0, 1, 2)
 
         # Travel Z Probe
-        self.ptravelz_label = QtWidgets.QLabel('%s:' % _("Probe Z travel"))
+        self.ptravelz_label = FCLabel('%s:' % _("Probe Z travel"))
         self.ptravelz_label.setToolTip(
             _("The safe Z for probe travelling between probe points.")
         )
@@ -2160,7 +2160,7 @@ class CNCObjectUI(ObjectUI):
         grid0.addWidget(self.ptravelz_entry, 9, 1)
 
         # Probe depth
-        self.pdepth_label = QtWidgets.QLabel('%s:' % _("Probe Z depth"))
+        self.pdepth_label = FCLabel('%s:' % _("Probe Z depth"))
         self.pdepth_label.setToolTip(
             _("The maximum depth that the probe is allowed\n"
               "to probe. Negative value, in current units.")
@@ -2173,7 +2173,7 @@ class CNCObjectUI(ObjectUI):
         grid0.addWidget(self.pdepth_entry, 11, 1)
 
         # Probe feedrate
-        self.feedrate_probe_label = QtWidgets.QLabel('%s:' % _("Probe Feedrate"))
+        self.feedrate_probe_label = FCLabel('%s:' % _("Probe Feedrate"))
         self.feedrate_probe_label.setToolTip(
            _("The feedrate used while the probe is probing.")
         )
@@ -2225,7 +2225,7 @@ class CNCObjectUI(ObjectUI):
         self.al_columns_entry = FCSpinner()
         self.al_columns_entry.setMinimum(2)
 
-        self.al_columns_label = QtWidgets.QLabel('%s:' % _("Columns"))
+        self.al_columns_label = FCLabel('%s:' % _("Columns"))
         self.al_columns_label.setToolTip(
             _("The number of grid columns.")
         )
@@ -2236,7 +2236,7 @@ class CNCObjectUI(ObjectUI):
         self.al_rows_entry = FCSpinner()
         self.al_rows_entry.setMinimum(2)
 
-        self.al_rows_label = QtWidgets.QLabel('%s:' % _("Rows"))
+        self.al_rows_label = FCLabel('%s:' % _("Rows"))
         self.al_rows_label.setToolTip(
             _("The number of grid rows.")
         )
@@ -2621,7 +2621,7 @@ class CNCObjectUI(ObjectUI):
         # #############################################################################################################
         # ## Export G-Code ##
         # #############################################################################################################
-        self.export_gcode_label = QtWidgets.QLabel("<b>%s:</b>" % _("Export CNC Code"))
+        self.export_gcode_label = FCLabel("<b>%s:</b>" % _("Export CNC Code"))
         self.export_gcode_label.setToolTip(
             _("Export and save G-Code to\n"
               "make this object to a file.")
@@ -2713,7 +2713,7 @@ class ScriptObjectUI(ObjectUI):
         self.name_hlay = QtWidgets.QHBoxLayout()
         self.custom_box.addLayout(self.name_hlay)
 
-        name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
+        name_label = FCLabel("<b>%s:</b>" % _("Name"))
         self.name_entry = FCEntry()
         self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
         self.name_hlay.addWidget(name_label)
@@ -2780,7 +2780,7 @@ class DocumentObjectUI(ObjectUI):
         self.name_hlay = QtWidgets.QHBoxLayout()
         self.custom_box.addLayout(self.name_hlay)
 
-        name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
+        name_label = FCLabel("<b>%s:</b>" % _("Name"))
         self.name_entry = FCEntry()
         self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
         self.name_hlay.addWidget(name_label)
@@ -2817,7 +2817,7 @@ class DocumentObjectUI(ObjectUI):
         self.custom_box.addLayout(self.form_box)
 
         # Font
-        self.font_type_label = QtWidgets.QLabel('%s:' % _("Font Type"))
+        self.font_type_label = FCLabel('%s:' % _("Font Type"))
 
         if sys.platform == "win32":
             f_current = QtGui.QFont("Arial")
@@ -2834,7 +2834,7 @@ class DocumentObjectUI(ObjectUI):
         self.form_box.addRow(self.font_type_label, self.font_type_cb)
 
         # Font Size
-        self.font_size_label = QtWidgets.QLabel('%s:' % _("Font Size"))
+        self.font_size_label = FCLabel('%s:' % _("Font Size"))
 
         self.font_size_cb = FCComboBox()
         self.font_size_cb.setEditable(True)
@@ -2870,7 +2870,7 @@ class DocumentObjectUI(ObjectUI):
         self.form_box.addRow(self.font_size_label, size_hlay)
 
         # Alignment Choices
-        self.alignment_label = QtWidgets.QLabel('%s:' % _("Alignment"))
+        self.alignment_label = FCLabel('%s:' % _("Alignment"))
 
         al_hlay = QtWidgets.QHBoxLayout()
 
@@ -2897,12 +2897,12 @@ class DocumentObjectUI(ObjectUI):
         self.form_box.addRow(self.alignment_label, al_hlay)
 
         # Font Color
-        self.font_color_label = QtWidgets.QLabel('%s:' % _('Font Color'))
+        self.font_color_label = FCLabel('%s:' % _('Font Color'))
         self.font_color_label.setToolTip(
            _("Set the font color for the selected text")
         )
         self.font_color_entry = FCEntry()
-        self.font_color_button = QtWidgets.QPushButton()
+        self.font_color_button = FCButton()
         self.font_color_button.setFixedSize(15, 15)
 
         self.form_box_child_1 = QtWidgets.QHBoxLayout()
@@ -2913,12 +2913,12 @@ class DocumentObjectUI(ObjectUI):
         self.form_box.addRow(self.font_color_label, self.form_box_child_1)
 
         # Selection Color
-        self.sel_color_label = QtWidgets.QLabel('%s:' % _('Selection Color'))
+        self.sel_color_label = FCLabel('%s:' % _('Selection Color'))
         self.sel_color_label.setToolTip(
            _("Set the selection color when doing text selection.")
         )
         self.sel_color_entry = FCEntry()
-        self.sel_color_button = QtWidgets.QPushButton()
+        self.sel_color_button = FCButton()
         self.sel_color_button.setFixedSize(15, 15)
 
         self.form_box_child_2 = QtWidgets.QHBoxLayout()
@@ -2929,7 +2929,7 @@ class DocumentObjectUI(ObjectUI):
         self.form_box.addRow(self.sel_color_label, self.form_box_child_2)
 
         # Tab size
-        self.tab_size_label = QtWidgets.QLabel('%s:' % _('Tab Size'))
+        self.tab_size_label = FCLabel('%s:' % _('Tab Size'))
         self.tab_size_label.setToolTip(
             _("Set the tab size. In pixels. Default value is 80 pixels.")
         )

+ 18 - 10
appObjects/FlatCAMCNCJob.py

@@ -2509,10 +2509,10 @@ class CNCJobObject(FlatCAMObj, CNCjob):
             if self.app.is_legacy is False:
                 self.annotation.clear(update=True)
 
-        # Annotaions shapes plotting
+        # Annotations shapes plotting
         try:
             if self.app.is_legacy is False:
-                if self.ui.annotation_cb.get_value() and self.ui.plot_cb.get_value():
+                if self.ui.annotation_cb.get_value() and visible:
                     self.plot_annotations(obj=self, visible=True)
                 else:
                     self.plot_annotations(obj=self, visible=False)
@@ -2521,20 +2521,28 @@ class CNCJobObject(FlatCAMObj, CNCjob):
             if self.app.is_legacy is False:
                 self.annotation.clear(update=True)
 
-    def on_annotation_change(self):
+    def on_annotation_change(self, val):
         """
         Handler for toggling the annotation display by clicking a checkbox.
         :return:
         """
 
         if self.app.is_legacy is False:
-            if self.ui.annotation_cb.get_value():
-                self.text_col.enabled = True
-            else:
-                self.text_col.enabled = False
-            # kind = self.ui.cncplot_method_combo.get_value()
-            # self.plot(kind=kind)
-            self.annotation.redraw()
+            # self.text_col.visible = True if val == 2 else False
+            # self.plot(kind=self.ui.cncplot_method_combo.get_value())
+            # Annotations shapes plotting
+            try:
+                if self.app.is_legacy is False:
+                    if val and self.ui.plot_cb.get_value():
+                        self.plot_annotations(obj=self, visible=True)
+                    else:
+                        self.plot_annotations(obj=self, visible=False)
+
+            except (ObjectDeleted, AttributeError):
+                if self.app.is_legacy is False:
+                    self.annotation.clear(update=True)
+
+            # self.annotation.redraw()
         else:
             kind = self.ui.cncplot_method_combo.get_value()
             self.plot(kind=kind)

+ 7 - 7
appTools/ToolPaint.py

@@ -13,8 +13,8 @@ from copy import deepcopy
 
 from appParsers.ParseGerber import Gerber
 from camlib import Geometry, FlatCAMRTreeStorage, grace
-from appGUI.GUIElements import FCTable, FCDoubleSpinner, FCCheckBox, FCInputDialog, RadioSet, FCButton, FCComboBox, \
-    FCLabel, FCComboBox2
+from appGUI.GUIElements import FCTable, FCDoubleSpinner, FCCheckBox, FCInputDoubleSpinner, RadioSet, \
+    FCButton, FCComboBox, FCLabel, FCComboBox2
 
 from shapely.geometry import base, Polygon, MultiPolygon, LinearRing, Point
 from shapely.ops import unary_union, linemerge
@@ -381,11 +381,11 @@ class ToolPaint(AppTool, Gerber):
         self.blockSignals(False)
 
     def on_add_tool_by_key(self):
-        tool_add_popup = FCInputDialog(title='%s...' % _("New Tool"),
-                                       text='%s:' % _('Enter a Tool Diameter'),
-                                       min=0.0000, max=99.9999, decimals=4,
-                                       parent=self.app.ui)
-        tool_add_popup.setWindowIcon(QtGui.QIcon(self.app.resource_location + '/letter_t_32.png'))
+        tool_add_popup = FCInputDoubleSpinner(title='%s...' % _("New Tool"),
+                                              text='%s:' % _('Enter a Tool Diameter'),
+                                              min=0.0000, max=99.9999, decimals=self.decimals,
+                                              parent=self.app.ui)
+        tool_add_popup.set_icon(QtGui.QIcon(self.app.resource_location + '/letter_t_32.png'))
 
         val, ok = tool_add_popup.get_value()
         if ok:

+ 26 - 20
app_Main.py

@@ -6115,10 +6115,12 @@ class App(QtCore.QObject):
             self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
         else:
             if silent is False:
-                rotatebox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
-                                          min=-360, max=360, decimals=4,
-                                          init_val=float(self.defaults['tools_transform_rotate']),
-                                          parent=self.ui)
+                rotatebox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
+                                                 min=-360, max=360, decimals=4,
+                                                 init_val=float(self.defaults['tools_transform_rotate']),
+                                                 parent=self.ui)
+                rotatebox.setWindowIcon(QtGui.QIcon(self.resource_location + '/rotate.png'))
+
                 num, ok = rotatebox.get_value()
             else:
                 num = preset
@@ -6167,10 +6169,12 @@ class App(QtCore.QObject):
         if not obj_list:
             self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
         else:
-            skewxbox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
-                                     min=-360, max=360, decimals=4,
-                                     init_val=float(self.defaults['tools_transform_skew_x']),
-                                     parent=self.ui)
+            skewxbox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
+                                            min=-360, max=360, decimals=4,
+                                            init_val=float(self.defaults['tools_transform_skew_x']),
+                                            parent=self.ui)
+            skewxbox.setWindowIcon(QtGui.QIcon(self.resource_location + '/skewX.png'))
+
             num, ok = skewxbox.get_value()
             if ok:
                 # first get a bounding box to fit all
@@ -6205,10 +6209,12 @@ class App(QtCore.QObject):
         if not obj_list:
             self.inform.emit('[WARNING_NOTCL] %s' % _("No object is selected."))
         else:
-            skewybox = FCInputDialog(title=_("Transform"), text=_("Enter the Angle value:"),
-                                     min=-360, max=360, decimals=4,
-                                     init_val=float(self.defaults['tools_transform_skew_y']),
-                                     parent=self.ui)
+            skewybox = FCInputDoubleSpinner(title=_("Transform"), text=_("Enter the Angle value:"),
+                                            min=-360, max=360, decimals=4,
+                                            init_val=float(self.defaults['tools_transform_skew_y']),
+                                            parent=self.ui)
+            skewybox.setWindowIcon(QtGui.QIcon(self.resource_location + '/skewY.png'))
+
             num, ok = skewybox.get_value()
             if ok:
                 # first get a bounding box to fit all
@@ -6307,10 +6313,10 @@ class App(QtCore.QObject):
         # ## Current application units in lower Case
         units = self.defaults['units'].lower()
 
-        grid_add_popup = FCInputDialog(title=_("New Grid ..."),
-                                       text=_('Enter a Grid Value:'),
-                                       min=0.0000, max=99.9999, decimals=4,
-                                       parent=self.ui)
+        grid_add_popup = FCInputDoubleSpinner(title=_("New Grid ..."),
+                                              text=_('Enter a Grid Value:'),
+                                              min=0.0000, max=99.9999, decimals=self.decimals,
+                                              parent=self.ui)
         grid_add_popup.setWindowIcon(QtGui.QIcon(self.resource_location + '/plus32.png'))
 
         val, ok = grid_add_popup.get_value()
@@ -6332,10 +6338,10 @@ class App(QtCore.QObject):
         # ## Current application units in lower Case
         units = self.defaults['units'].lower()
 
-        grid_del_popup = FCInputDialog(title="Delete Grid ...",
-                                       text='Enter a Grid Value:',
-                                       min=0.0000, max=99.9999, decimals=4,
-                                       parent=self.ui)
+        grid_del_popup = FCInputDoubleSpinner(title="Delete Grid ...",
+                                              text='Enter a Grid Value:',
+                                              min=0.0000, max=99.9999, decimals=self.decimals,
+                                              parent=self.ui)
         grid_del_popup.setWindowIcon(QtGui.QIcon(self.resource_location + '/delete32.png'))
 
         val, ok = grid_del_popup.get_value()

BIN
assets/resources/clean32.png


BIN
assets/resources/convert32.png


BIN
assets/resources/dark_resources/clean32.png


BIN
assets/resources/dark_resources/convert32.png


BIN
assets/resources/dark_resources/scale32.png


BIN
assets/resources/scale32.png


+ 14 - 3
camlib.py

@@ -6830,7 +6830,7 @@ class CNCjob(Geometry):
 
         :param obj:         FlatCAM CNCJob object for which to plot the annotations
         :type obj:
-        :param visible:     annotaions visibility
+        :param visible:     annotations visibility
         :type visible:      bool
         :return:            Nothing
         :rtype:
@@ -6840,9 +6840,11 @@ class CNCjob(Geometry):
             return
 
         if visible is True:
-            obj.text_col.enabled = True
+            if self.app.is_legacy is False:
+                obj.annotation.clear(update=True)
+            obj.text_col.visible = True
         else:
-            obj.text_col.enabled = False
+            obj.text_col.visible = False
             return
 
         text = []
@@ -8607,6 +8609,15 @@ class FlatCAMRTree(object):
         """
         return next(self.rti.nearest(pt, objects=True))
 
+    def intersection(self, pt):
+        """
+        Will raise StopIteration if no items are found.
+
+        :param pt:
+        :return:
+        """
+        return next(self.rti.intersection(pt, objects=True))
+
 
 class FlatCAMRTreeStorage(FlatCAMRTree):
     """

BIN
locale/de/LC_MESSAGES/strings.mo


Diferenças do arquivo suprimidas por serem muito extensas
+ 170 - 168
locale/de/LC_MESSAGES/strings.po


BIN
locale/en/LC_MESSAGES/strings.mo


Diferenças do arquivo suprimidas por serem muito extensas
+ 170 - 170
locale/en/LC_MESSAGES/strings.po


BIN
locale/es/LC_MESSAGES/strings.mo


Diferenças do arquivo suprimidas por serem muito extensas
+ 170 - 168
locale/es/LC_MESSAGES/strings.po


BIN
locale/fr/LC_MESSAGES/strings.mo


Diferenças do arquivo suprimidas por serem muito extensas
+ 170 - 168
locale/fr/LC_MESSAGES/strings.po


BIN
locale/it/LC_MESSAGES/strings.mo


Diferenças do arquivo suprimidas por serem muito extensas
+ 170 - 168
locale/it/LC_MESSAGES/strings.po


BIN
locale/pt_BR/LC_MESSAGES/strings.mo


Diferenças do arquivo suprimidas por serem muito extensas
+ 170 - 168
locale/pt_BR/LC_MESSAGES/strings.po


BIN
locale/ro/LC_MESSAGES/strings.mo


Diferenças do arquivo suprimidas por serem muito extensas
+ 170 - 168
locale/ro/LC_MESSAGES/strings.po


Diferenças do arquivo suprimidas por serem muito extensas
+ 169 - 167
locale/ru/LC_MESSAGES/strings.po


BIN
locale/tr/LC_MESSAGES/strings.mo


Diferenças do arquivo suprimidas por serem muito extensas
+ 174 - 176
locale/tr/LC_MESSAGES/strings.po


Diferenças do arquivo suprimidas por serem muito extensas
+ 173 - 171
locale_template/strings.pot


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff