diff --git a/Bookmark.py b/Bookmark.py index 796c1105..a3b6629d 100644 --- a/Bookmark.py +++ b/Bookmark.py @@ -75,7 +75,7 @@ class BookmarkManager(QtWidgets.QWidget): new_vlay = QtWidgets.QVBoxLayout() layout.addLayout(new_vlay) - new_title_lbl = FCLabel('%s' % _("New Bookmark")) + new_title_lbl = FCLabel('%s' % _("New Bookmark"), bold=True) new_vlay.addWidget(new_title_lbl) grid0 = GLay(v_spacing=5, h_spacing=3) diff --git a/appDatabase.py b/appDatabase.py index 8f21063a..0d487586 100644 --- a/appDatabase.py +++ b/appDatabase.py @@ -226,7 +226,7 @@ class ToolsDB2UI: self.grid_tool.addWidget(self.dia_entry, 1, 1) # Tool Tolerance - self.tol_label = FCLabel("%s:" % _("Diameter Tolerance")) + self.tol_label = FCLabel('%s:' % _("Diameter Tolerance"), bold=True) self.tol_label.setToolTip( _("Tool tolerance. This tool will be used if the desired tool diameter\n" "is within the tolerance specified here.") @@ -262,7 +262,7 @@ class ToolsDB2UI: self.grid_tool.addWidget(self.tol_max_entry, 6, 1) # Tool Object Type - self.tool_op_label = FCLabel('%s:' % _('Target')) + self.tool_op_label = FCLabel('%s:' % _('Target'), bold=True) self.tool_op_label.setToolTip( _("The kind of Application Tool where this tool is to be used.")) diff --git a/appEditors/AppExcEditor.py b/appEditors/AppExcEditor.py index 5d701f71..91bf4cf9 100644 --- a/appEditors/AppExcEditor.py +++ b/appEditors/AppExcEditor.py @@ -4054,7 +4054,7 @@ class AppExcEditorUI: self.name_box.addWidget(self.name_entry) # Tools Drills Table Title - self.tools_table_label = FCLabel("%s" % _('Tools Table')) + self.tools_table_label = FCLabel('%s' % _('Tools Table'), bold=True) self.tools_table_label.setToolTip( _("Tools in this Excellon object\n" "when are used for drilling.") @@ -4091,7 +4091,7 @@ class AppExcEditorUI: self.ui_vertical_lay.addWidget(separator_line) # Add a new Tool - self.addtool_label = FCLabel('%s' % _('Add/Delete Tool')) + self.addtool_label = FCLabel('%s' % _('Add/Delete Tool'), bold=True) self.addtool_label.setToolTip( _("Add/Delete a tool to the tool list\n" "for this Excellon object.") @@ -4157,7 +4157,7 @@ class AppExcEditorUI: self.resize_grid.setContentsMargins(0, 0, 0, 0) self.resize_frame.setLayout(self.resize_grid) - self.drillresize_label = FCLabel('%s' % _("Resize Tool")) + self.drillresize_label = FCLabel('%s' % _("Resize Tool"), bold=True) self.drillresize_label.setToolTip( _("Resize a drill or a selection of drills.") ) @@ -4212,7 +4212,7 @@ class AppExcEditorUI: self.array_frame.setLayout(self.array_grid) # Type of Drill Array - self.drill_array_label = FCLabel('%s' % _("Add Drill Array")) + self.drill_array_label = FCLabel('%s' % _("Add Drill Array"), bold=True) self.drill_array_label.setToolTip( _("Add an array of drills (linear or circular array)") ) @@ -4352,7 +4352,7 @@ class AppExcEditorUI: self.slot_frame.setLayout(self.slot_grid) # Slot Tile Label - self.slot_label = FCLabel('%s' % _("Slot Parameters")) + self.slot_label = FCLabel('%s' % _("Slot Parameters"), bold=True) self.slot_label.setToolTip( _("Parameters for adding a slot (hole with oval shape)\n" "either single or as an part of an array.") @@ -4424,7 +4424,7 @@ class AppExcEditorUI: self.slot_array_frame.setLayout(self.slot_array_grid) # Slot Array Title - self.slot_array_label = FCLabel('%s' % _("Slot Array Parameters")) + self.slot_array_label = FCLabel('%s' % _("Slot Array Parameters"), bold=True) self.slot_array_label.setToolTip( _("Parameters for the array of slots (linear or circular array)") ) diff --git a/appEditors/AppGeoEditor.py b/appEditors/AppGeoEditor.py index 8183c40d..c32d2e89 100644 --- a/appEditors/AppGeoEditor.py +++ b/appEditors/AppGeoEditor.py @@ -3096,7 +3096,7 @@ class AppGeoEditor(QtCore.QObject): self.tools_box.addLayout(self.grid_d) # Tool diameter - tooldia_lbl = FCLabel('%s:' % _("Tool dia")) + tooldia_lbl = FCLabel('%s' % _("Tool dia"), bold=True) tooldia_lbl.setToolTip( _("Edited tool diameter.") ) @@ -3108,7 +3108,7 @@ class AppGeoEditor(QtCore.QObject): self.grid_d.addWidget(tooldia_lbl, 0, 0) self.grid_d.addWidget(self.tooldia_entry, 0, 1) # Tree Widget Title - tw_label = FCLabel('%s:' % _("Geometry Table")) + tw_label = FCLabel('%s' % _("Geometry Table"), bold=True) tw_label.setToolTip( _("The list of geometry elements inside the edited object.") ) @@ -3148,35 +3148,35 @@ class AppGeoEditor(QtCore.QObject): grid0.addWidget(separator_line, 2, 0, 1, 3) # Parameters Title - param_title = FCLabel('%s:' % _("Parameters")) + param_title = FCLabel('%s' % _("Parameters"), bold=True) param_title.setToolTip( _("Geometry parameters.") ) grid0.addWidget(param_title, 4, 0, 1, 3) # Is Valid - is_valid_lbl = FCLabel('%s:' % _("Is Valid")) + is_valid_lbl = FCLabel('%s' % _("Is Valid"), bold=True) self.is_valid_entry = FCLabel('None') grid0.addWidget(is_valid_lbl, 10, 0) grid0.addWidget(self.is_valid_entry, 10, 1, 1, 2) # Is Empty - is_empty_lbl = FCLabel('%s:' % _("Is Empty")) + is_empty_lbl = FCLabel('%s' % _("Is Empty"), bold=True) self.is_empty_entry = FCLabel('None') grid0.addWidget(is_empty_lbl, 12, 0) grid0.addWidget(self.is_empty_entry, 12, 1, 1, 2) # Is Ring - is_ring_lbl = FCLabel('%s:' % _("Is Ring")) + is_ring_lbl = FCLabel('%s' % _("Is Ring"), bold=True) self.is_ring_entry = FCLabel('None') grid0.addWidget(is_ring_lbl, 14, 0) grid0.addWidget(self.is_ring_entry, 14, 1, 1, 2) # Is CCW - is_ccw_lbl = FCLabel('%s:' % _("Is CCW")) + is_ccw_lbl = FCLabel('%s' % _("Is CCW"), bold=True) self.is_ccw_entry = FCLabel('None') self.change_orientation_btn = FCButton(_("Change")) self.change_orientation_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/orientation32.png')) @@ -3189,14 +3189,14 @@ class AppGeoEditor(QtCore.QObject): grid0.addWidget(self.change_orientation_btn, 16, 2) # Is Simple - is_simple_lbl = FCLabel('%s:' % _("Is Simple")) + is_simple_lbl = FCLabel('%s' % _("Is Simple"), bold=True) self.is_simple_entry = FCLabel('None') grid0.addWidget(is_simple_lbl, 18, 0) grid0.addWidget(self.is_simple_entry, 18, 1, 1, 2) # Length - len_lbl = FCLabel('%s:' % _("Length")) + len_lbl = FCLabel('%s' % _("Length"), bold=True) len_lbl.setToolTip( _("The length of the geometry element.") ) @@ -3207,7 +3207,7 @@ class AppGeoEditor(QtCore.QObject): grid0.addWidget(self.geo_len_entry, 20, 1, 1, 2) # Coordinates - coords_lbl = FCLabel('%s:' % _("Coordinates")) + coords_lbl = FCLabel('%s' % _("Coordinates"), bold=True) coords_lbl.setToolTip( _("The coordinates of the selected geometry element.") ) @@ -3220,7 +3220,7 @@ class AppGeoEditor(QtCore.QObject): grid0.addWidget(self.geo_coords_entry, 24, 0, 1, 3) # Vertex Points Number - vertex_lbl = FCLabel('%s:' % _("Vertex Points")) + vertex_lbl = FCLabel('%s' % _("Vertex Points"), bold=True) vertex_lbl.setToolTip( _("The number of vertex points in the selected geometry element.") ) diff --git a/appEditors/AppGerberEditor.py b/appEditors/AppGerberEditor.py index 6613ecc5..90a9cd9e 100644 --- a/appEditors/AppGerberEditor.py +++ b/appEditors/AppGerberEditor.py @@ -6174,7 +6174,7 @@ class AppGerberEditorUI: # ############################################################################################################# # #################################### Gerber Apertures Table ################################################# # ############################################################################################################# - self.apertures_table_label = FCLabel('%s:' % _('Apertures')) + self.apertures_table_label = FCLabel('%s:' % _('Apertures'), bold=True) self.apertures_table_label.setToolTip( _("Apertures Table for the Gerber Object.") ) @@ -6225,7 +6225,7 @@ class AppGerberEditorUI: self.apertures_box.addLayout(grid1) # Title - apadd_del_lbl = FCLabel('%s:' % _('Add/Delete Aperture')) + apadd_del_lbl = FCLabel('%s:' % _('Add/Delete Aperture'), bold=True) apadd_del_lbl.setToolTip( _("Add/Delete an aperture in the aperture table") ) @@ -6334,7 +6334,7 @@ class AppGerberEditorUI: self.shape_grid.addWidget(separator_line, 2, 0, 1, 3) # Parameters Title - param_title = FCLabel('%s' % _("Parameters")) + param_title = FCLabel('%s' % _("Parameters"), bold=True) param_title.setToolTip( _("Geometry parameters.") ) @@ -6343,7 +6343,7 @@ class AppGerberEditorUI: p_grid = GLay(v_spacing=5, h_spacing=3, c_stretch=[0, 0, 0, 1, 0]) # Is Valid - valid_lbl = FCLabel('%s:' % _("Valid")) + valid_lbl = FCLabel('%s' % _("Valid"), bold=True) valid_lbl.setToolTip( _("Show if the selected polygon is valid.") ) @@ -6352,7 +6352,7 @@ class AppGerberEditorUI: p_grid.addWidget(self.is_valid_entry, 0, 1) # Area - area_lbl = FCLabel('%s:' % _("Area")) + area_lbl = FCLabel('%s' % _("Area"), bold=True) area_lbl.setToolTip( _("Show the area of the selected polygon.") ) @@ -6397,7 +6397,7 @@ class AppGerberEditorUI: self.shape_grid.addWidget(separator_line, 12, 0, 1, 3) # Simplification Title - simplif_lbl = FCLabel('%s:' % _("Simplification")) + simplif_lbl = FCLabel('%s' % _("Simplification"), bold=True) simplif_lbl.setToolTip( _("Simplify a geometry by reducing its vertex points number.") ) @@ -6445,7 +6445,7 @@ class AppGerberEditorUI: self.buffer_tool_frame.hide() # Title - buf_title_lbl = FCLabel('%s:' % _('Buffer Aperture')) + buf_title_lbl = FCLabel('%s:' % _('Buffer Aperture'), bold=True) buf_title_lbl.setToolTip( _("Buffer a aperture in the aperture list") ) @@ -6503,7 +6503,7 @@ class AppGerberEditorUI: self.scale_tool_frame.hide() # Title - scale_title_lbl = FCLabel('%s:' % _('Scale Aperture')) + scale_title_lbl = FCLabel('%s:' % _('Scale Aperture'), bold=True) scale_title_lbl.setToolTip( _("Scale a aperture in the aperture list") ) @@ -6552,7 +6552,7 @@ class AppGerberEditorUI: self.ma_tools_box.addWidget(separator_line) # Title - ma_title_lbl = FCLabel('%s:' % _('Mark polygons')) + ma_title_lbl = FCLabel('%s:' % _('Mark polygons'), bold=True) ma_title_lbl.setToolTip( _("Mark the polygon areas.") ) @@ -6632,7 +6632,7 @@ class AppGerberEditorUI: self.array_box.addLayout(array_grid) # Title - self.padarray_label = FCLabel('%s' % _("Add Pad Array")) + self.padarray_label = FCLabel('%s' % _("Add Pad Array"), bold=True) self.padarray_label.setToolTip( _("Add an array of pads (linear or circular array)") ) diff --git a/appEditors/geo_plugins/GeoCirclePlugin.py b/appEditors/geo_plugins/GeoCirclePlugin.py index 397b2451..5b86414c 100644 --- a/appEditors/geo_plugins/GeoCirclePlugin.py +++ b/appEditors/geo_plugins/GeoCirclePlugin.py @@ -187,7 +187,7 @@ class CircleEditorUI: self.circle_tool_box.addLayout(grid0) # Position - self.pos_lbl = FCLabel('%s' % _("Position")) + self.pos_lbl = FCLabel('%s' % _("Position"), bold=True) grid0.addWidget(self.pos_lbl, 0, 0, 1, 3) # X Pos @@ -246,7 +246,7 @@ class CircleEditorUI: self.layout.addStretch(1) # Note - self.note_lbl = FCLabel('%s' % _("Note")) + self.note_lbl = FCLabel('%s' % _("Note"), bold=True) self.layout.addWidget(self.note_lbl) self.note_description_lbl = FCLabel('%s' % _("Shift + click to select a shape for modification.")) self.layout.addWidget(self.note_description_lbl) diff --git a/appEditors/geo_plugins/GeoCopyPlugin.py b/appEditors/geo_plugins/GeoCopyPlugin.py index fb71cd2f..4cc079cc 100644 --- a/appEditors/geo_plugins/GeoCopyPlugin.py +++ b/appEditors/geo_plugins/GeoCopyPlugin.py @@ -164,7 +164,7 @@ class CopyEditorUI: grid0.addWidget(separator_line, 4, 0, 1, 2) # Type of Array - self.mode_label = FCLabel('%s:' % _("Mode")) + self.mode_label = FCLabel('%s:' % _("Mode"), bold=True) self.mode_label.setToolTip( _("Single copy or special (array of copies)") ) diff --git a/appEditors/geo_plugins/GeoRectanglePlugin.py b/appEditors/geo_plugins/GeoRectanglePlugin.py index 9acc15d6..d76a9aed 100644 --- a/appEditors/geo_plugins/GeoRectanglePlugin.py +++ b/appEditors/geo_plugins/GeoRectanglePlugin.py @@ -220,7 +220,7 @@ class RectangleEditorUI: self.rect_tool_box.addLayout(grid0) # Anchor - self.anchor_lbl = FCLabel('%s:' % _("Anchor")) + self.anchor_lbl = FCLabel('%s:' % _("Anchor"), bold=True) choices = [ {"label": _("T Left"), "value": "tl"}, {"label": _("T Right"), "value": "tr"}, @@ -233,7 +233,7 @@ class RectangleEditorUI: grid0.addWidget(self.anchor_radio, 0, 1) # Position - self.pos_lbl = FCLabel('%s' % _("Position")) + self.pos_lbl = FCLabel('%s' % _("Position"), bold=True) grid0.addWidget(self.pos_lbl, 2, 0, 1, 2) # X Pos @@ -277,7 +277,7 @@ class RectangleEditorUI: grid0.addWidget(self.radius_entry, 10, 1) # Size - self.size_lbl = FCLabel('%s' % _("Size")) + self.size_lbl = FCLabel('%s' % _("Size"), bold=True) grid0.addWidget(self.size_lbl, 12, 0, 1, 2) # Length @@ -300,7 +300,7 @@ class RectangleEditorUI: self.layout.addStretch(1) # Note - self.note_lbl = FCLabel('%s' % _("Note")) + self.note_lbl = FCLabel('%s' % _("Note"), bold=True) self.layout.addWidget(self.note_lbl) self.note_description_lbl = FCLabel('%s' % _("Shift + click to select a shape for modification.")) self.layout.addWidget(self.note_description_lbl) diff --git a/appEditors/geo_plugins/GeoSimplificationPlugin.py b/appEditors/geo_plugins/GeoSimplificationPlugin.py index 7fe9938a..ddeda6cb 100644 --- a/appEditors/geo_plugins/GeoSimplificationPlugin.py +++ b/appEditors/geo_plugins/GeoSimplificationPlugin.py @@ -196,7 +196,7 @@ class SimplificationEditorUI: self.simp_tools_box.addLayout(grid0) # Coordinates - coords_lbl = FCLabel('%s:' % _("Coordinates")) + coords_lbl = FCLabel('%s' % _("Coordinates"), bold=True) coords_lbl.setToolTip( _("The coordinates of the selected geometry element.") ) @@ -209,7 +209,7 @@ class SimplificationEditorUI: grid0.addWidget(self.geo_coords_entry, 24, 0, 1, 3) # Vertex Points Number - vertex_lbl = FCLabel('%s:' % _("Vertex Points")) + vertex_lbl = FCLabel('%s' % _("Vertex Points"), bold=True) vertex_lbl.setToolTip( _("The number of vertex points in the selected geometry element.") ) @@ -225,14 +225,14 @@ class SimplificationEditorUI: grid0.addWidget(separator_line, 28, 0, 1, 3) # Simplification Title - simplif_lbl = FCLabel('%s:' % _("Simplification")) + simplif_lbl = FCLabel('%s' % _("Simplification"), bold=True) simplif_lbl.setToolTip( _("Simplify a geometry by reducing its vertex points number.") ) grid0.addWidget(simplif_lbl, 30, 0, 1, 3) # Simplification Tolerance - simplification_tol_lbl = FCLabel('%s:' % _("Tolerance")) + simplification_tol_lbl = FCLabel('%s' % _("Tolerance"), bold=True) simplification_tol_lbl.setToolTip( _("All points in the simplified object will be\n" "within the tolerance distance of the original geometry.") diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py index b3175fe1..71bc92ec 100644 --- a/appGUI/MainGUI.py +++ b/appGUI/MainGUI.py @@ -62,20 +62,6 @@ class MainGUI(QtWidgets.QMainWindow): self.app = app self.decimals = self.app.decimals - # The menu bar theming differs between operating systems - # Windows menu theme is controlled by the application - # MacOS menu theme is controlled by OS - if sys.platform == 'win32': - if self.app.options["global_theme"] == 'light': - self.menu_resource_location = 'assets/resources' - else: - self.menu_resource_location = 'assets/resources/dark_resources' - else: - if darkdetect.isLight(): - self.menu_resource_location = 'assets/resources' - else: - self.menu_resource_location = 'assets/resources/dark_resources' - # Divine icon pack by Ipapun @ finicons.com # ####################################################################### @@ -88,7 +74,7 @@ class MainGUI(QtWidgets.QMainWindow): self.menu = self.menuBar() self.menu_toggle_nb = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/notebook32.png'), _("Toggle Panel")) + QtGui.QIcon(self.app.resource_location + '/notebook32.png'), _("Toggle Panel")) self.menu_toggle_nb.setToolTip( _("Toggle Panel") ) @@ -104,7 +90,7 @@ class MainGUI(QtWidgets.QMainWindow): self.menufile.setToolTipsVisible(True) # New Project - self.menufilenewproject = QtGui.QAction(QtGui.QIcon(self.menu_resource_location + '/file16.png'), + self.menufilenewproject = QtGui.QAction(QtGui.QIcon(self.app.resource_location + '/file16.png'), '%s...\t%s' % (_('New Project'), _("Ctrl+N")), self) self.menufilenewproject.setToolTip( _("Will create a new, blank project") @@ -112,88 +98,88 @@ class MainGUI(QtWidgets.QMainWindow): self.menufile.addAction(self.menufilenewproject) # New Category (Excellon, Geometry) - self.menufilenew = self.menufile.addMenu(QtGui.QIcon(self.menu_resource_location + '/file16.png'), _('New')) + self.menufilenew = self.menufile.addMenu(QtGui.QIcon(self.app.resource_location + '/file16.png'), _('New')) self.menufilenew.setToolTipsVisible(True) self.menufilenewgeo = self.menufilenew.addAction( - QtGui.QIcon(self.menu_resource_location + '/new_file_geo16.png'), '%s\t%s' % (_('Geometry'), _('N'))) + QtGui.QIcon(self.app.resource_location + '/new_file_geo16.png'), '%s\t%s' % (_('Geometry'), _('N'))) self.menufilenewgeo.setToolTip( _("Will create a new, empty Geometry Object.") ) self.menufilenewgrb = self.menufilenew.addAction( - QtGui.QIcon(self.menu_resource_location + '/new_file_grb16.png'), '%s\t%s' % (_('Gerber'), _('B'))) + QtGui.QIcon(self.app.resource_location + '/new_file_grb16.png'), '%s\t%s' % (_('Gerber'), _('B'))) self.menufilenewgrb.setToolTip( _("Will create a new, empty Gerber Object.") ) self.menufilenewexc = self.menufilenew.addAction( - QtGui.QIcon(self.menu_resource_location + '/new_file_exc16.png'), '%s\t%s' % (_('Excellon'), _('L'))) + QtGui.QIcon(self.app.resource_location + '/new_file_exc16.png'), '%s\t%s' % (_('Excellon'), _('L'))) self.menufilenewexc.setToolTip( _("Will create a new, empty Excellon Object.") ) self.menufilenew.addSeparator() self.menufilenewdoc = self.menufilenew.addAction( - QtGui.QIcon(self.menu_resource_location + '/notes16_1.png'), '%s\t%s' % (_('Document'), _('D'))) + QtGui.QIcon(self.app.resource_location + '/notes16_1.png'), '%s\t%s' % (_('Document'), _('D'))) self.menufilenewdoc.setToolTip( _("Will create a new, empty Document Object.") ) self.menufile_open = self.menufile.addMenu( - QtGui.QIcon(self.menu_resource_location + '/folder32_bis.png'), '%s' % _('Open')) + QtGui.QIcon(self.app.resource_location + '/folder32_bis.png'), '%s' % _('Open')) self.menufile_open.setToolTipsVisible(True) # Open Project ... self.menufileopenproject = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/folder16.png'), '%s...\t%s' % (_('Open Project'), _('Ctrl+O')), + QtGui.QIcon(self.app.resource_location + '/folder16.png'), '%s...\t%s' % (_('Open Project'), _('Ctrl+O')), self) self.menufile_open.addAction(self.menufileopenproject) self.menufile_open.addSeparator() # Open Gerber ... - self.menufileopengerber = QtGui.QAction(QtGui.QIcon(self.menu_resource_location + '/flatcam_icon24.png'), + self.menufileopengerber = QtGui.QAction(QtGui.QIcon(self.app.resource_location + '/flatcam_icon24.png'), '%s...\t%s' % (_('Open Gerber'), _('Ctrl+G')), self) self.menufile_open.addAction(self.menufileopengerber) # Open Excellon ... - self.menufileopenexcellon = QtGui.QAction(QtGui.QIcon(self.menu_resource_location + '/open_excellon32.png'), + self.menufileopenexcellon = QtGui.QAction(QtGui.QIcon(self.app.resource_location + '/open_excellon32.png'), '%s...\t%s' % (_('Open Excellon'), _('Ctrl+E')), self) self.menufile_open.addAction(self.menufileopenexcellon) # Open G-Code ... self.menufileopengcode = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/code.png'), '%s...\t%s' % (_('Open G-Code'), ''), self) + QtGui.QIcon(self.app.resource_location + '/code.png'), '%s...\t%s' % (_('Open G-Code'), ''), self) self.menufile_open.addAction(self.menufileopengcode) self.menufile_open.addSeparator() # Open Config File... self.menufileopenconfig = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/folder16.png'), '%s...\t%s' % (_('Open Config'), ''), self) + QtGui.QIcon(self.app.resource_location + '/folder16.png'), '%s...\t%s' % (_('Open Config'), ''), self) self.menufile_open.addAction(self.menufileopenconfig) # Recent self.recent_projects = self.menufile.addMenu( - QtGui.QIcon(self.menu_resource_location + '/recent_files.png'), _("Recent projects")) + QtGui.QIcon(self.app.resource_location + '/recent_files.png'), _("Recent projects")) self.recent = self.menufile.addMenu( - QtGui.QIcon(self.menu_resource_location + '/recent_files.png'), _("Recent files")) + QtGui.QIcon(self.app.resource_location + '/recent_files.png'), _("Recent files")) # SAVE category - self.menufile_save = self.menufile.addMenu(QtGui.QIcon(self.menu_resource_location + '/save_as.png'), _('Save')) + self.menufile_save = self.menufile.addMenu(QtGui.QIcon(self.app.resource_location + '/save_as.png'), _('Save')) # Save Project self.menufilesaveproject = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/floppy16.png'), '%s...\t%s' % (_('Save Project'), _('Ctrl+S')), + QtGui.QIcon(self.app.resource_location + '/floppy16.png'), '%s...\t%s' % (_('Save Project'), _('Ctrl+S')), self) self.menufile_save.addAction(self.menufilesaveproject) # Save Project As ... - self.menufilesaveprojectas = QtGui.QAction(QtGui.QIcon(self.menu_resource_location + '/floppy16.png'), + self.menufilesaveprojectas = QtGui.QAction(QtGui.QIcon(self.app.resource_location + '/floppy16.png'), '%s...\t%s' % (_('Save Project As'), _('Ctrl+Shift+S')), self) self.menufile_save.addAction(self.menufilesaveprojectas) # Save Project Copy ... # self.menufilesaveprojectcopy = QtGui.QAction( - # QtGui.QIcon(self.menu_resource_location + '/floppy16.png'), _('Save Project Copy ...'), self) + # QtGui.QIcon(self.app.resource_location + '/floppy16.png'), _('Save Project Copy ...'), self) # self.menufile_save.addAction(self.menufilesaveprojectcopy) self.menufile_save.addSeparator() @@ -203,18 +189,18 @@ class MainGUI(QtWidgets.QMainWindow): # Scripting self.menufile_scripting = self.menufile.addMenu( - QtGui.QIcon(self.menu_resource_location + '/script16.png'), _('Scripting')) + QtGui.QIcon(self.app.resource_location + '/script16.png'), _('Scripting')) self.menufile_scripting.setToolTipsVisible(True) - self.menufilenewscript = QtGui.QAction(QtGui.QIcon(self.menu_resource_location + '/script_new16.png'), + self.menufilenewscript = QtGui.QAction(QtGui.QIcon(self.app.resource_location + '/script_new16.png'), '%s...\t%s' % (_('New Script'), ''), self) - self.menufileopenscript = QtGui.QAction(QtGui.QIcon(self.menu_resource_location + '/open_script32.png'), + self.menufileopenscript = QtGui.QAction(QtGui.QIcon(self.app.resource_location + '/open_script32.png'), '%s...\t%s' % (_('Open Script'), ''), self) self.menufileopenscriptexample = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/open_script32.png'), + QtGui.QIcon(self.app.resource_location + '/open_script32.png'), '%s...\t%s' % (_('Open Example'), ''), self) self.menufilerunscript = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/script16.png'), + QtGui.QIcon(self.app.resource_location + '/script16.png'), '%s...\t%s' % (_('Run Script'), _('Shift+S')), self) self.menufilerunscript.setToolTip( _("Will run the opened Tcl Script thus\n" @@ -232,51 +218,51 @@ class MainGUI(QtWidgets.QMainWindow): # Import ... self.menufileimport = self.menufile.addMenu( - QtGui.QIcon(self.menu_resource_location + '/import.png'), _('Import')) + QtGui.QIcon(self.app.resource_location + '/import.png'), _('Import')) self.menufileimportsvg = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/svg16.png'), + QtGui.QIcon(self.app.resource_location + '/svg16.png'), '%s...\t%s' % (_('SVG as Geometry Object'), ''), self) self.menufileimport.addAction(self.menufileimportsvg) self.menufileimportsvg_as_gerber = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/svg16.png'), + QtGui.QIcon(self.app.resource_location + '/svg16.png'), '%s...\t%s' % (_('SVG as Gerber Object'), ''), self) self.menufileimport.addAction(self.menufileimportsvg_as_gerber) self.menufileimport.addSeparator() self.menufileimportdxf = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/dxf16.png'), + QtGui.QIcon(self.app.resource_location + '/dxf16.png'), '%s...\t%s' % (_('DXF as Geometry Object'), ''), self) self.menufileimport.addAction(self.menufileimportdxf) self.menufileimportdxf_as_gerber = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/dxf16.png'), + QtGui.QIcon(self.app.resource_location + '/dxf16.png'), '%s...\t%s' % (_('DXF as Gerber Object'), ''), self) self.menufileimport.addAction(self.menufileimportdxf_as_gerber) self.menufileimport.addSeparator() self.menufileimport_hpgl2_as_geo = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/dxf16.png'), + QtGui.QIcon(self.app.resource_location + '/dxf16.png'), '%s...\t%s' % (_('HPGL2 as Geometry Object'), ''), self) self.menufileimport.addAction(self.menufileimport_hpgl2_as_geo) self.menufileimport.addSeparator() # Export ... self.menufileexport = self.menufile.addMenu( - QtGui.QIcon(self.menu_resource_location + '/export.png'), _('Export')) + QtGui.QIcon(self.app.resource_location + '/export.png'), _('Export')) self.menufileexport.setToolTipsVisible(True) self.menufileexportsvg = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/export.png'), + QtGui.QIcon(self.app.resource_location + '/export.png'), '%s...\t%s' % (_('Export SVG'), ''), self) self.menufileexport.addAction(self.menufileexportsvg) self.menufileexportdxf = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/export.png'), + QtGui.QIcon(self.app.resource_location + '/export.png'), '%s...\t%s' % (_('Export DXF'), ''), self) self.menufileexport.addAction(self.menufileexportdxf) self.menufileexport.addSeparator() self.menufileexportpng = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/export_png32.png'), + QtGui.QIcon(self.app.resource_location + '/export_png32.png'), '%s...\t%s' % (_('Export PNG'), ''), self) self.menufileexportpng.setToolTip( _("Will export an image in PNG format,\n" @@ -288,7 +274,7 @@ class MainGUI(QtWidgets.QMainWindow): self.menufileexport.addSeparator() self.menufileexportexcellon = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/drill32.png'), + QtGui.QIcon(self.app.resource_location + '/drill32.png'), '%s...\t%s' % (_('Export Excellon'), ''), self) self.menufileexportexcellon.setToolTip( _("Will export an Excellon Object as Excellon file,\n" @@ -298,7 +284,7 @@ class MainGUI(QtWidgets.QMainWindow): self.menufileexport.addAction(self.menufileexportexcellon) self.menufileexportgerber = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/flatcam_icon32.png'), + QtGui.QIcon(self.app.resource_location + '/flatcam_icon32.png'), '%s...\t%s' % (_('Export Gerber'), ''), self) self.menufileexportgerber.setToolTip( _("Will export an Gerber Object as Gerber file,\n" @@ -311,18 +297,18 @@ class MainGUI(QtWidgets.QMainWindow): self.menufile.addSeparator() self.menufile_backup = self.menufile.addMenu( - QtGui.QIcon(self.menu_resource_location + '/backup24.png'), _('Backup')) + QtGui.QIcon(self.app.resource_location + '/backup24.png'), _('Backup')) # Import Preferences self.menufileimportpref = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/backup_import24.png'), + QtGui.QIcon(self.app.resource_location + '/backup_import24.png'), '%s...\t%s' % (_('Import Preferences from file'), ''), self ) self.menufile_backup.addAction(self.menufileimportpref) # Export Preferences self.menufileexportpref = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/backup_export24.png'), + QtGui.QIcon(self.app.resource_location + '/backup_export24.png'), '%s...\t%s' % (_('Export Preferences to file'), ''), self) self.menufile_backup.addAction(self.menufileexportpref) @@ -331,14 +317,14 @@ class MainGUI(QtWidgets.QMainWindow): # Save Defaults self.menufilesavedefaults = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/defaults.png'), + QtGui.QIcon(self.app.resource_location + '/defaults.png'), '%s\t%s' % (_('Save Preferences'), ''), self) self.menufile_backup.addAction(self.menufilesavedefaults) # Separator self.menufile.addSeparator() self.menufile_print = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/printer32.png'), + QtGui.QIcon(self.app.resource_location + '/printer32.png'), '%s\t%s' % (_('Print (PDF)'), _('Ctrl+P'))) self.menufile.addAction(self.menufile_print) @@ -347,7 +333,7 @@ class MainGUI(QtWidgets.QMainWindow): # Quit self.menufile_exit = QtGui.QAction( - QtGui.QIcon(self.menu_resource_location + '/power16.png'), + QtGui.QIcon(self.app.resource_location + '/power16.png'), '%s\t%s' % (_('Exit'), ''), self) # exitAction.setShortcut('Ctrl+Q') # exitAction.setStatusTip('Exit application') @@ -360,10 +346,10 @@ class MainGUI(QtWidgets.QMainWindow): # Separator self.menuedit.addSeparator() self.menueditedit = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/edit16.png'), + QtGui.QIcon(self.app.resource_location + '/edit16.png'), '%s\t%s' % (_('Edit Object'), _('E'))) self.menueditok = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/power16.png'), + QtGui.QIcon(self.app.resource_location + '/power16.png'), '%s\t%s' % (_('Exit Editor'), _('Ctrl+S'))) # adjust the initial state of the menu entries related to the editor @@ -374,17 +360,17 @@ class MainGUI(QtWidgets.QMainWindow): # Separator self.menuedit.addSeparator() self.menuedit_convert = self.menuedit.addMenu( - QtGui.QIcon(self.menu_resource_location + '/convert24.png'), _('Conversion')) + QtGui.QIcon(self.app.resource_location + '/convert24.png'), _('Conversion')) self.menuedit_convert_sg2mg = self.menuedit_convert.addAction( - QtGui.QIcon(self.menu_resource_location + '/convert24.png'), + QtGui.QIcon(self.app.resource_location + '/convert24.png'), '%s\t%s' % (_('Convert Single to MultiGeo'), '')) self.menuedit_convert_sg2mg.setToolTip( _("Will convert a Geometry object from single_geometry type\n" "to a multi_geometry type.") ) self.menuedit_convert_mg2sg = self.menuedit_convert.addAction( - QtGui.QIcon(self.menu_resource_location + '/convert24.png'), + QtGui.QIcon(self.app.resource_location + '/convert24.png'), '%s\t%s' % (_('Convert Multi to SingleGeo'), '')) self.menuedit_convert_mg2sg.setToolTip( _("Will convert a Geometry object from multi_geometry type\n" @@ -393,21 +379,21 @@ class MainGUI(QtWidgets.QMainWindow): # Separator self.menuedit_convert.addSeparator() self.menueditconvert_any2geo = self.menuedit_convert.addAction( - QtGui.QIcon(self.menu_resource_location + '/copy_geo.png'), + QtGui.QIcon(self.app.resource_location + '/copy_geo.png'), '%s\t%s' % (_('Convert Any to Geo'), '')) self.menueditconvert_any2gerber = self.menuedit_convert.addAction( - QtGui.QIcon(self.menu_resource_location + '/copy_geo.png'), + QtGui.QIcon(self.app.resource_location + '/copy_geo.png'), '%s\t%s' % (_('Convert Any to Gerber'), '')) self.menueditconvert_any2excellon = self.menuedit_convert.addAction( - QtGui.QIcon(self.menu_resource_location + '/copy_geo.png'), + QtGui.QIcon(self.app.resource_location + '/copy_geo.png'), '%s\t%s' % (_('Convert Any to Excellon'), '')) self.menuedit_convert.setToolTipsVisible(True) # ############################ EDIT -> JOIN ###################################################### self.menuedit_join = self.menuedit.addMenu( - QtGui.QIcon(self.menu_resource_location + '/join16.png'), _('Join Objects')) + QtGui.QIcon(self.app.resource_location + '/join16.png'), _('Join Objects')) self.menuedit_join2geo = self.menuedit_join.addAction( - QtGui.QIcon(self.menu_resource_location + '/join16.png'), + QtGui.QIcon(self.app.resource_location + '/join16.png'), '%s\t%s' % (_('Join Geo/Gerber/Exc -> Geo'), '')) self.menuedit_join2geo.setToolTip( _("Merge a selection of objects, which can be of type:\n" @@ -417,13 +403,13 @@ class MainGUI(QtWidgets.QMainWindow): "into a new combo Geometry object.") ) self.menuedit_join_exc2exc = self.menuedit_join.addAction( - QtGui.QIcon(self.menu_resource_location + '/join16.png'), + QtGui.QIcon(self.app.resource_location + '/join16.png'), '%s\t%s' % (_('Join Excellon(s) -> Excellon'), '')) self.menuedit_join_exc2exc.setToolTip( _("Merge a selection of Excellon objects into a new combo Excellon object.") ) self.menuedit_join_grb2grb = self.menuedit_join.addAction( - QtGui.QIcon(self.menu_resource_location + '/join16.png'), + QtGui.QIcon(self.app.resource_location + '/join16.png'), '%s\t%s' % (_('Join Gerber(s) -> Gerber'), '')) self.menuedit_join_grb2grb.setToolTip( _("Merge a selection of Gerber objects into a new combo Gerber object.") @@ -434,50 +420,50 @@ class MainGUI(QtWidgets.QMainWindow): # Separator self.menuedit.addSeparator() self.menueditcopyobject = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/copy.png'), + QtGui.QIcon(self.app.resource_location + '/copy.png'), '%s\t%s' % (_('Copy'), _('Ctrl+C'))) # Separator self.menuedit.addSeparator() self.menueditdelete = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/trash16.png'), + QtGui.QIcon(self.app.resource_location + '/trash16.png'), '%s\t%s' % (_('Delete'), _('DEL'))) # Separator self.menuedit.addSeparator() self.menuedit_numeric_move = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/move32_bis.png'), + QtGui.QIcon(self.app.resource_location + '/move32_bis.png'), '%s\t%s' % (_('Num Move'), '')) self.menueditorigin = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/origin16.png'), + QtGui.QIcon(self.app.resource_location + '/origin16.png'), '%s\t%s' % (_('Set Origin'), _('O'))) self.menuedit_move2origin = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/origin2_16.png'), + QtGui.QIcon(self.app.resource_location + '/origin2_16.png'), '%s\t%s' % (_('Move to Origin'), _('Shift+O'))) self.menuedit_center_in_origin = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/origin3_32.png'), + QtGui.QIcon(self.app.resource_location + '/origin3_32.png'), '%s\t%s' % (_('Custom Origin'), '')) self.menueditjump = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/jump_to16.png'), + QtGui.QIcon(self.app.resource_location + '/jump_to16.png'), '%s\t%s' % (_('Jump to Location'), _('J'))) self.menueditlocate = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/locate16.png'), + QtGui.QIcon(self.app.resource_location + '/locate16.png'), '%s\t%s' % (_('Locate in Object'), _('Shift+J'))) # Separator self.menuedit.addSeparator() self.menuedittoggleunits = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/toggle_units16.png'), + QtGui.QIcon(self.app.resource_location + '/toggle_units16.png'), '%s\t%s' % (_('Toggle Units'), _('Q'))) self.menueditselectall = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/select_all.png'), + QtGui.QIcon(self.app.resource_location + '/select_all.png'), '%s\t%s' % (_('Select All'), _('Ctrl+A'))) # Separator self.menuedit.addSeparator() self.menueditpreferences = self.menuedit.addAction( - QtGui.QIcon(self.menu_resource_location + '/pref.png'), + QtGui.QIcon(self.app.resource_location + '/pref.png'), '%s\t%s' % (_('Preferences'), _('Shift+P'))) # ############################################################################################################# @@ -486,44 +472,44 @@ class MainGUI(QtWidgets.QMainWindow): self.menuoptions = self.menu.addMenu(_('Options')) self.menuoptions_transform_rotate = self.menuoptions.addAction( - QtGui.QIcon(self.menu_resource_location + '/rotate.png'), + QtGui.QIcon(self.app.resource_location + '/rotate.png'), '%s\t%s' % (_("Rotate Selection"), _('Shift+(R)'))) # Separator self.menuoptions.addSeparator() self.menuoptions_transform_skewx = self.menuoptions.addAction( - QtGui.QIcon(self.menu_resource_location + '/skewX.png'), + QtGui.QIcon(self.app.resource_location + '/skewX.png'), '%s\t%s' % (_("Skew on X axis"), _('Shift+X'))) self.menuoptions_transform_skewy = self.menuoptions.addAction( - QtGui.QIcon(self.menu_resource_location + '/skewY.png'), + QtGui.QIcon(self.app.resource_location + '/skewY.png'), '%s\t%s' % (_("Skew on Y axis"), _('Shift+Y'))) # Separator self.menuoptions.addSeparator() self.menuoptions_transform_flipx = self.menuoptions.addAction( - QtGui.QIcon(self.menu_resource_location + '/flipx.png'), + QtGui.QIcon(self.app.resource_location + '/flipx.png'), '%s\t%s' % (_("Flip on X axis"), _('X'))) self.menuoptions_transform_flipy = self.menuoptions.addAction( - QtGui.QIcon(self.menu_resource_location + '/flipy.png'), + QtGui.QIcon(self.app.resource_location + '/flipy.png'), '%s\t%s' % (_("Flip on Y axis"), _('Y'))) # Separator self.menuoptions.addSeparator() self.menuoptions_view_source = self.menuoptions.addAction( - QtGui.QIcon(self.menu_resource_location + '/source32.png'), + QtGui.QIcon(self.app.resource_location + '/source32.png'), '%s\t%s' % (_("View source"), _('Alt+S'))) self.menuoptions_tools_db = self.menuoptions.addAction( - QtGui.QIcon(self.menu_resource_location + '/database32.png'), + QtGui.QIcon(self.app.resource_location + '/database32.png'), '%s\t%s' % (_("Tools Database"), _('Ctrl+D'))) # Separator self.menuoptions.addSeparator() # ########################### Options ->Experimental ########################################################## self.menuoptions_experimental = self.menuoptions.addMenu( - QtGui.QIcon(self.menu_resource_location + '/experiment32.png'), _('Experimental')) + QtGui.QIcon(self.app.resource_location + '/experiment32.png'), _('Experimental')) self.menuoptions_experimental_3D_area = self.menuoptions_experimental.addAction( - QtGui.QIcon(self.menu_resource_location + '/3D_area32.png'), + QtGui.QIcon(self.app.resource_location + '/3D_area32.png'), '%s\t%s' % (_('3D Area'), '')) # Separator self.menuoptions.addSeparator() @@ -533,71 +519,71 @@ class MainGUI(QtWidgets.QMainWindow): # ############################################################################################################# self.menuview = self.menu.addMenu(_('View')) self.menuviewenable = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/replot16.png'), + QtGui.QIcon(self.app.resource_location + '/replot16.png'), '%s\t%s' % (_('Enable all'), _('Alt+1'))) self.menuviewdisableall = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/clear_plot16.png'), + QtGui.QIcon(self.app.resource_location + '/clear_plot16.png'), '%s\t%s' % (_('Disable all'), _('Alt+2'))) self.menuviewenableother = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/replot16.png'), + QtGui.QIcon(self.app.resource_location + '/replot16.png'), '%s\t%s' % (_('Enable non-selected'), _('Alt+3'))) self.menuviewdisableother = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/clear_plot16.png'), + QtGui.QIcon(self.app.resource_location + '/clear_plot16.png'), '%s\t%s' % (_('Disable non-selected'), _('Alt+4'))) # Separator self.menuview.addSeparator() self.menuview_zoom_fit = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/zoom_fit32.png'), + QtGui.QIcon(self.app.resource_location + '/zoom_fit32.png'), '%s\t%s' % (_("Zoom Fit"), _('V'))) self.menuview_zoom_in = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/zoom_in32.png'), + QtGui.QIcon(self.app.resource_location + '/zoom_in32.png'), '%s\t%s' % (_("Zoom In"), _('='))) self.menuview_zoom_out = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/zoom_out32.png'), + QtGui.QIcon(self.app.resource_location + '/zoom_out32.png'), '%s\t%s' % (_("Zoom Out"), _('-'))) self.menuview.addSeparator() # Replot all self.menuview_replot = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/replot32.png'), + QtGui.QIcon(self.app.resource_location + '/replot32.png'), '%s\t%s' % (_("Redraw All"), _('F5'))) self.menuview.addSeparator() self.menuview_toggle_code_editor = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/code_editor32.png'), + QtGui.QIcon(self.app.resource_location + '/code_editor32.png'), '%s\t%s' % (_('Toggle Code Editor'), _('Shift+E'))) self.menuview.addSeparator() self.menuview_toggle_fscreen = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/fscreen32.png'), + QtGui.QIcon(self.app.resource_location + '/fscreen32.png'), '%s\t%s' % (_("Toggle FullScreen"), _('Alt+F10'))) self.menuview_toggle_parea = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/plot32.png'), + QtGui.QIcon(self.app.resource_location + '/plot32.png'), '%s\t%s' % (_("Toggle Plot Area"), _('Ctrl+F10'))) self.menuview_toggle_notebook = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/notebook32.png'), + QtGui.QIcon(self.app.resource_location + '/notebook32.png'), '%s\t%s' % (_("Toggle Project/Properties/Tool"), _('`'))) self.menuview.addSeparator() self.menuview_toggle_grid = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/grid32.png'), + QtGui.QIcon(self.app.resource_location + '/grid32.png'), '%s\t%s' % (_("Toggle Grid Snap"), _('G'))) self.menuview_toggle_grid_lines = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/grid_lines32.png'), + QtGui.QIcon(self.app.resource_location + '/grid_lines32.png'), '%s\t%s' % (_("Toggle Grid Lines"), _('Shift+G'))) self.menuview_toggle_axis = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/axis32.png'), + QtGui.QIcon(self.app.resource_location + '/axis32.png'), '%s\t%s' % (_("Toggle Axis"), _('Shift+A'))) self.menuview_toggle_workspace = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/workspace24.png'), + QtGui.QIcon(self.app.resource_location + '/workspace24.png'), '%s\t%s' % (_("Toggle Workspace"), _('Shift+W'))) self.menuview_toggle_hud = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/hud_32.png'), + QtGui.QIcon(self.app.resource_location + '/hud_32.png'), '%s\t%s' % (_("Toggle HUD"), _('Shift+H'))) self.menuview.addSeparator() self.menuview_show_log = self.menuview.addAction( - QtGui.QIcon(self.menu_resource_location + '/log32.png'), + QtGui.QIcon(self.app.resource_location + '/log32.png'), '%s\t%s' % (_("Error Log"), '')) # ######################################################################## @@ -606,10 +592,10 @@ class MainGUI(QtWidgets.QMainWindow): self.menuobjects = self.menu.addMenu(_('Objects')) self.menuobjects.addSeparator() self.menuobjects_selall = self.menuobjects.addAction( - QtGui.QIcon(self.menu_resource_location + '/select_all.png'), + QtGui.QIcon(self.app.resource_location + '/select_all.png'), '%s\t%s' % (_('Select All'), '')) self.menuobjects_unselall = self.menuobjects.addAction( - QtGui.QIcon(self.menu_resource_location + '/deselect_all32.png'), + QtGui.QIcon(self.app.resource_location + '/deselect_all32.png'), '%s\t%s' % (_('Deselect All'), '')) # ######################################################################## @@ -618,7 +604,7 @@ class MainGUI(QtWidgets.QMainWindow): self.menu_plugins = QtWidgets.QMenu(_('Plugins')) self.menu_plugins_action = self.menu.addMenu(self.menu_plugins) self.menu_plugins_shell = self.menu_plugins.addAction( - QtGui.QIcon(self.menu_resource_location + '/shell16.png'), + QtGui.QIcon(self.app.resource_location + '/shell16.png'), '%s\t%s' % (_('Command Line'), _('S'))) # ######################################################################## @@ -626,49 +612,49 @@ class MainGUI(QtWidgets.QMainWindow): # ######################################################################## self.menuhelp = self.menu.addMenu(_('Help')) self.menuhelp_manual = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/globe16.png'), + QtGui.QIcon(self.app.resource_location + '/globe16.png'), '%s\t%s' % (_('Online Help'), _('F1'))) self.menuhelp_bookmarks = self.menuhelp.addMenu( - QtGui.QIcon(self.menu_resource_location + '/bookmarks16.png'), _('Bookmarks')) + QtGui.QIcon(self.app.resource_location + '/bookmarks16.png'), _('Bookmarks')) self.menuhelp_bookmarks.addSeparator() self.menuhelp_bookmarks_manager = self.menuhelp_bookmarks.addAction( - QtGui.QIcon(self.menu_resource_location + '/bookmarks16.png'), + QtGui.QIcon(self.app.resource_location + '/bookmarks16.png'), '%s\t%s' % (_('Bookmarks Manager'), '')) self.menuhelp.addSeparator() self.menuhelp_report_bug = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/bug16.png'), + QtGui.QIcon(self.app.resource_location + '/bug16.png'), '%s\t%s' % (_('Report a bug'), '')) self.menuhelp.addSeparator() self.menuhelp_exc_spec = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/pdf_link16.png'), + QtGui.QIcon(self.app.resource_location + '/pdf_link16.png'), '%s\t%s' % (_('Excellon Specification'), '')) self.menuhelp_gerber_spec = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/pdf_link16.png'), + QtGui.QIcon(self.app.resource_location + '/pdf_link16.png'), '%s\t%s' % (_('Gerber Specification'), '')) self.menuhelp.addSeparator() self.menuhelp_shortcut_list = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/shortcuts24.png'), + QtGui.QIcon(self.app.resource_location + '/shortcuts24.png'), '%s\t%s' % (_('Shortcuts List'), _('F3'))) self.menuhelp_videohelp = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/youtube32.png'), + QtGui.QIcon(self.app.resource_location + '/youtube32.png'), '%s\t%s' % (_('YouTube Channel'), _('F4'))) self.menuhelp.addSeparator() self.menuhelp_donate = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/paypal32.png'), + QtGui.QIcon(self.app.resource_location + '/paypal32.png'), '%s\t%s' % (_('Donate'), '')) self.menuhelp_readme = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/warning.png'), + QtGui.QIcon(self.app.resource_location + '/warning.png'), '%s\t%s' % (_("How To"), '')) self.menuhelp_about = self.menuhelp.addAction( - QtGui.QIcon(self.menu_resource_location + '/about32.png'), + QtGui.QIcon(self.app.resource_location + '/about32.png'), '%s\t%s' % (_('About'), '')) # ######################################################################## @@ -678,79 +664,79 @@ class MainGUI(QtWidgets.QMainWindow): self.menu.addMenu(self.geo_editor_menu) self.geo_add_circle_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/circle32.png'), + QtGui.QIcon(self.app.resource_location + '/circle32.png'), '%s\t%s' % (_('Add Circle'), _('O')) ) self.geo_add_arc_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/arc16.png'), + QtGui.QIcon(self.app.resource_location + '/arc16.png'), '%s\t%s' % (_('Add Arc'), _('A'))) self.geo_editor_menu.addSeparator() self.geo_add_rectangle_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/rectangle32.png'), + QtGui.QIcon(self.app.resource_location + '/rectangle32.png'), '%s\t%s' % (_('Add Rectangle'), _('R')) ) self.geo_add_polygon_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/polygon32.png'), + QtGui.QIcon(self.app.resource_location + '/polygon32.png'), '%s\t%s' % (_('Add Polygon'), _('N')) ) self.geo_add_path_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/path32.png'), + QtGui.QIcon(self.app.resource_location + '/path32.png'), '%s\t%s' % (_('Add Path'), _('P'))) self.geo_editor_menu.addSeparator() self.geo_add_text_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/text32.png'), + QtGui.QIcon(self.app.resource_location + '/text32.png'), '%s\t%s' % (_('Add Text'), _('T'))) self.geo_editor_menu.addSeparator() self.geo_union_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/union16.png'), + QtGui.QIcon(self.app.resource_location + '/union16.png'), '%s\t%s' % (_('Polygon Union'), _('U'))) self.geo_intersection_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/intersection16.png'), + QtGui.QIcon(self.app.resource_location + '/intersection16.png'), '%s\t%s' % (_('Polygon Intersection'), _('E'))) self.geo_subtract_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/subtract16.png'), + QtGui.QIcon(self.app.resource_location + '/subtract16.png'), '%s\t%s' % (_('Polygon Subtraction'), _('S')) ) self.geo_subtract_alt_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/subtract16.png'), + QtGui.QIcon(self.app.resource_location + '/subtract16.png'), '%s\t%s' % (_('Alt Subtraction'), '') ) self.geo_editor_menu.addSeparator() self.geo_cutpath_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/cutpath16.png'), + QtGui.QIcon(self.app.resource_location + '/cutpath16.png'), '%s\t%s' % (_('Cut Path'), _('X'))) # self.move_menuitem = self.menu.addAction( - # QtGui.QIcon(self.menu_resource_location + '/move16.png'), "Move Objects 'm'") + # QtGui.QIcon(self.app.resource_location + '/move16.png'), "Move Objects 'm'") self.geo_copy_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/copy16.png'), + QtGui.QIcon(self.app.resource_location + '/copy16.png'), '%s\t%s' % (_("Copy Geom"), _('C'))) self.geo_delete_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/deleteshape16.png'), + QtGui.QIcon(self.app.resource_location + '/deleteshape16.png'), '%s\t%s' % (_("Delete Shape"), _('DEL')) ) self.geo_editor_menu.addSeparator() self.geo_move_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/move32.png'), + QtGui.QIcon(self.app.resource_location + '/move32.png'), '%s\t%s' % (_("Move"), _('M'))) self.geo_buffer_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/buffer16.png'), + QtGui.QIcon(self.app.resource_location + '/buffer16.png'), '%s\t%s' % (_("Buffer"), _('B')) ) self.geo_simplification_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/simplify32.png'), + QtGui.QIcon(self.app.resource_location + '/simplify32.png'), '%s\t%s' % (_("Simplification"), '') ) self.geo_paint_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/paint20_1.png'), + QtGui.QIcon(self.app.resource_location + '/paint20_1.png'), '%s\t%s' % (_("Paint"), _('I')) ) self.geo_transform_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/transform.png'), + QtGui.QIcon(self.app.resource_location + '/transform.png'), '%s\t%s' % (_("Transformation"), _('Alt+R')) ) self.geo_editor_menu.addSeparator() self.geo_cornersnap_menuitem = self.geo_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/corner32.png'), + QtGui.QIcon(self.app.resource_location + '/corner32.png'), '%s\t%s' % (_("Toggle Corner Snap"), _('K')) ) @@ -761,36 +747,36 @@ class MainGUI(QtWidgets.QMainWindow): self.menu.addMenu(self.exc_editor_menu) self.exc_add_array_drill_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/rectangle32.png'), + QtGui.QIcon(self.app.resource_location + '/rectangle32.png'), '%s\t%s' % (_('Add Drill Array'), _('A'))) self.exc_add_drill_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/plus16.png'), + QtGui.QIcon(self.app.resource_location + '/plus16.png'), '%s\t%s' % (_('Add Drill'), _('D'))) self.exc_editor_menu.addSeparator() self.exc_add_array_slot_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/slot_array26.png'), + QtGui.QIcon(self.app.resource_location + '/slot_array26.png'), '%s\t%s' % (_('Add Slot Array'), _('Q'))) self.exc_add_slot_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/slot26.png'), + QtGui.QIcon(self.app.resource_location + '/slot26.png'), '%s\t%s' % (_('Add Slot'), _('W'))) self.exc_editor_menu.addSeparator() self.exc_resize_drill_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/resize16.png'), + QtGui.QIcon(self.app.resource_location + '/resize16.png'), '%s\t%s' % (_('Resize Drill(S)'), _('R')) ) self.exc_copy_drill_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/copy32.png'), + QtGui.QIcon(self.app.resource_location + '/copy32.png'), '%s\t%s' % (_('Copy'), _('C'))) self.exc_delete_drill_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/deleteshape32.png'), + QtGui.QIcon(self.app.resource_location + '/deleteshape32.png'), '%s\t%s' % (_('Delete'), _('DEL')) ) self.exc_editor_menu.addSeparator() self.exc_move_drill_menuitem = self.exc_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/move32.png'), + QtGui.QIcon(self.app.resource_location + '/move32.png'), '%s\t%s' % (_('Move Drill'), _('M'))) # ######################################################################## @@ -800,55 +786,55 @@ class MainGUI(QtWidgets.QMainWindow): self.menu.addMenu(self.grb_editor_menu) self.grb_add_pad_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/aperture16.png'), + QtGui.QIcon(self.app.resource_location + '/aperture16.png'), '%s\t%s' % (_('Add Pad'), _('P'))) self.grb_add_pad_array_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/padarray32.png'), + QtGui.QIcon(self.app.resource_location + '/padarray32.png'), '%s\t%s' % (_('Add Pad Array'), _('A'))) self.grb_add_track_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/track32.png'), + QtGui.QIcon(self.app.resource_location + '/track32.png'), '%s\t%s' % (_('Add Track'), _('T'))) self.grb_add_region_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/rectangle32.png'), + QtGui.QIcon(self.app.resource_location + '/rectangle32.png'), '%s\t%s' % (_('Add Region'), _('N'))) self.grb_editor_menu.addSeparator() self.grb_convert_poly_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/poligonize32.png'), + QtGui.QIcon(self.app.resource_location + '/poligonize32.png'), '%s\t%s' % (_("Poligonize"), _('Alt+N'))) self.grb_add_semidisc_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/semidisc32.png'), + QtGui.QIcon(self.app.resource_location + '/semidisc32.png'), '%s\t%s' % (_("Add SemiDisc"), _('E'))) self.grb_add_disc_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/disc32.png'), + QtGui.QIcon(self.app.resource_location + '/disc32.png'), '%s\t%s' % (_("Add Disc"), _('D'))) self.grb_add_buffer_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/buffer16-2.png'), + QtGui.QIcon(self.app.resource_location + '/buffer16-2.png'), '%s\t%s' % (_('Buffer'), _('B'))) self.grb_add_scale_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/scale32.png'), + QtGui.QIcon(self.app.resource_location + '/scale32.png'), '%s\t%s' % (_('Scale'), _('S'))) self.grb_add_markarea_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/markarea32.png'), + QtGui.QIcon(self.app.resource_location + '/markarea32.png'), '%s\t%s' % (_('Mark Area'), _('Alt+A'))) self.grb_add_eraser_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/eraser26.png'), + QtGui.QIcon(self.app.resource_location + '/eraser26.png'), '%s\t%s' % (_('Eraser'), _('Ctrl+E'))) self.grb_transform_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/transform.png'), + QtGui.QIcon(self.app.resource_location + '/transform.png'), '%s\t%s' % (_("Transform"), _('Alt+R'))) self.grb_editor_menu.addSeparator() self.grb_copy_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/copy32.png'), + QtGui.QIcon(self.app.resource_location + '/copy32.png'), '%s\t%s' % (_('Copy'), _('C'))) self.grb_delete_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/deleteshape32.png'), + QtGui.QIcon(self.app.resource_location + '/deleteshape32.png'), '%s\t%s' % (_('Delete'), _('DEL'))) self.grb_editor_menu.addSeparator() self.grb_move_menuitem = self.grb_editor_menu.addAction( - QtGui.QIcon(self.menu_resource_location + '/move32.png'), + QtGui.QIcon(self.app.resource_location + '/move32.png'), '%s\t%s' % (_('Move'), _('M'))) self.grb_editor_menu.menuAction().setVisible(False) @@ -866,71 +852,71 @@ class MainGUI(QtWidgets.QMainWindow): self.menuproject = QtWidgets.QMenu() self.menuprojectenable = self.menuproject.addAction( - QtGui.QIcon(self.menu_resource_location + '/replot32.png'), _('Enable Plot')) + QtGui.QIcon(self.app.resource_location + '/replot32.png'), _('Enable Plot')) self.menuprojectdisable = self.menuproject.addAction( - QtGui.QIcon(self.menu_resource_location + '/clear_plot32.png'), _('Disable Plot')) + QtGui.QIcon(self.app.resource_location + '/clear_plot32.png'), _('Disable Plot')) self.menuproject.addSeparator() self.menuprojectcolor = self.menuproject.addMenu( - QtGui.QIcon(self.menu_resource_location + '/set_color32.png'), _('Set Color')) + QtGui.QIcon(self.app.resource_location + '/set_color32.png'), _('Set Color')) self.menuproject_red = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/red32.png'), _('Red')) + QtGui.QIcon(self.app.resource_location + '/red32.png'), _('Red')) self.menuproject_blue = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/blue32.png'), _('Blue')) + QtGui.QIcon(self.app.resource_location + '/blue32.png'), _('Blue')) self.menuproject_yellow = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/yellow32.png'), _('Yellow')) + QtGui.QIcon(self.app.resource_location + '/yellow32.png'), _('Yellow')) self.menuproject_green = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/green32.png'), _('Green')) + QtGui.QIcon(self.app.resource_location + '/green32.png'), _('Green')) self.menuproject_purple = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/violet32.png'), _('Purple')) + QtGui.QIcon(self.app.resource_location + '/violet32.png'), _('Purple')) self.menuproject_brown = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/brown32.png'), _('Brown')) + QtGui.QIcon(self.app.resource_location + '/brown32.png'), _('Brown')) self.menuproject_brown = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/indigo32.png'), _('Indigo')) + QtGui.QIcon(self.app.resource_location + '/indigo32.png'), _('Indigo')) self.menuproject_brown = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/white32.png'), _('White')) + QtGui.QIcon(self.app.resource_location + '/white32.png'), _('White')) self.menuproject_brown = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/black32.png'), _('Black')) + QtGui.QIcon(self.app.resource_location + '/black32.png'), _('Black')) self.menuprojectcolor.addSeparator() self.menuproject_custom = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/set_color32.png'), _('Custom')) + QtGui.QIcon(self.app.resource_location + '/set_color32.png'), _('Custom')) self.menuprojectcolor.addSeparator() self.menuproject_custom = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/set_color32.png'), _('Opacity')) + QtGui.QIcon(self.app.resource_location + '/set_color32.png'), _('Opacity')) self.menuproject_custom = self.menuprojectcolor.addAction( - QtGui.QIcon(self.menu_resource_location + '/set_color32.png'), _('Default')) + QtGui.QIcon(self.app.resource_location + '/set_color32.png'), _('Default')) self.menuproject.addSeparator() self.menuprojectviewsource = self.menuproject.addAction( - QtGui.QIcon(self.menu_resource_location + '/source32.png'), _('View Source')) + QtGui.QIcon(self.app.resource_location + '/source32.png'), _('View Source')) self.menuprojectedit = self.menuproject.addAction( - QtGui.QIcon(self.menu_resource_location + '/edit_ok32.png'), _('Edit')) + QtGui.QIcon(self.app.resource_location + '/edit_ok32.png'), _('Edit')) self.menuprojectcopy = self.menuproject.addAction( - QtGui.QIcon(self.menu_resource_location + '/copy32.png'), _('Copy')) + QtGui.QIcon(self.app.resource_location + '/copy32.png'), _('Copy')) self.menuprojectdelete = self.menuproject.addAction( - QtGui.QIcon(self.menu_resource_location + '/delete32.png'), _('Delete')) + QtGui.QIcon(self.app.resource_location + '/delete32.png'), _('Delete')) self.menuprojectsave = self.menuproject.addAction( - QtGui.QIcon(self.menu_resource_location + '/save_as.png'), _('Save')) + QtGui.QIcon(self.app.resource_location + '/save_as.png'), _('Save')) self.menuproject.addSeparator() self.menuprojectproperties = self.menuproject.addAction( - QtGui.QIcon(self.menu_resource_location + '/properties32.png'), _('Properties')) + QtGui.QIcon(self.app.resource_location + '/properties32.png'), _('Properties')) # ######################################################################## # ####################### Central Widget -> Splitter # ################## diff --git a/appGUI/ObjectUI.py b/appGUI/ObjectUI.py index 937f2f71..a7b757eb 100644 --- a/appGUI/ObjectUI.py +++ b/appGUI/ObjectUI.py @@ -197,7 +197,7 @@ class GerberObjectUI(ObjectUI): plot_grid.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft | QtCore.Qt.AlignmentFlag.AlignVCenter) gen_frame.setLayout(plot_grid) - self.plot_options_label = FCLabel("%s:" % _("Plot Options")) + self.plot_options_label = FCLabel('%s:' % _("Plot Options"), bold=True) plot_grid.addWidget(self.plot_options_label, 0, 0) @@ -219,7 +219,7 @@ class GerberObjectUI(ObjectUI): self.name_hlay = QtWidgets.QHBoxLayout() plot_grid.addLayout(self.name_hlay, 1, 0, 1, 3) - name_label = FCLabel("%s:" % _("Name")) + name_label = FCLabel('%s:' % _("Name"), bold=True) self.name_entry = FCEntry() self.name_entry.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus) self.name_hlay.addWidget(name_label) @@ -482,7 +482,7 @@ class GerberObjectUI(ObjectUI): # Non-Copper Regions Frame # ############################################################################################################# # ## Non-copper regions - self.noncopper_label = FCLabel("%s" % _("Non-copper regions")) + self.noncopper_label = FCLabel('%s' % _("Non-copper regions"), bold=True) self.noncopper_label.setToolTip( _("Create polygons covering the\n" "areas without copper on the PCB.\n" @@ -530,7 +530,7 @@ class GerberObjectUI(ObjectUI): # Bounding Box Frame # ############################################################################################################# # ## Bounding box - self.boundingbox_label = FCLabel('%s' % _('Bounding Box')) + self.boundingbox_label = FCLabel('%s' % _('Bounding Box'), bold=True) self.boundingbox_label.setToolTip( _("Create a geometry surrounding the Gerber object.\n" "Square shape.") @@ -617,7 +617,7 @@ class ExcellonObjectUI(ObjectUI): gen_frame.setLayout(plot_grid) # Plot options - self.plot_options_label = FCLabel("%s: " % _("Plot Options")) + self.plot_options_label = FCLabel('%s: ' % _("Plot Options"), bold=True) # Solid CB self.solid_cb = FCCheckBox(label=_('Solid')) @@ -638,7 +638,7 @@ class ExcellonObjectUI(ObjectUI): # ## Object name self.name_hlay = QtWidgets.QHBoxLayout() - name_label = FCLabel("%s: " % _("Name")) + name_label = FCLabel('%s: ' % _("Name"), bold=True) self.name_entry = FCEntry() self.name_entry.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus) self.name_hlay.addWidget(name_label) @@ -844,7 +844,7 @@ class ExcellonObjectUI(ObjectUI): # ############################################################################################################# # Milling Drill Holes Frame # ############################################################################################################# - self.mill_hole_label = FCLabel('%s' % _('Milling Geometry')) + self.mill_hole_label = FCLabel('%s' % _('Milling Geometry'), bold=True) self.mill_hole_label.setToolTip( _("Create Geometry for milling holes.\n" "Select from the Tools Table above the hole dias to be\n" @@ -953,7 +953,7 @@ class GeometryObjectUI(ObjectUI): plot_grid.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft | QtCore.Qt.AlignmentFlag.AlignVCenter) gen_frame.setLayout(plot_grid) - self.plot_options_label = FCLabel("%s:" % _("Plot Options")) + self.plot_options_label = FCLabel('%s:' % _("Plot Options"), bold=True) self.plot_options_label.setMinimumWidth(90) plot_grid.addWidget(self.plot_options_label, 0, 0) @@ -970,7 +970,7 @@ class GeometryObjectUI(ObjectUI): self.name_hlay = QtWidgets.QHBoxLayout() plot_grid.addLayout(self.name_hlay, 2, 0, 1, 3) - name_label = FCLabel("%s:" % _("Name")) + name_label = FCLabel('%s:' % _("Name"), bold=True) self.name_entry = FCEntry() self.name_entry.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus) self.name_hlay.addWidget(name_label) @@ -1033,7 +1033,7 @@ class GeometryObjectUI(ObjectUI): self.tt_frame.setLayout(tt_grid) # ### Tools #### - self.tools_table_label = FCLabel('%s:' % _('Tools Table')) + self.tools_table_label = FCLabel('%s:' % _('Tools Table'), bold=True) 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" @@ -1182,7 +1182,7 @@ class GeometryObjectUI(ObjectUI): # Simplification Frame # ############################################################################################################# # Simplification Title - simplif_lbl = FCLabel('%s:' % _("Simplification")) + simplif_lbl = FCLabel('%s' % _("Simplification"), bold=True) simplif_lbl.setToolTip( _("Simplify a geometry by reducing its vertex points number.") ) @@ -1296,7 +1296,7 @@ class CNCObjectUI(ObjectUI): gen_frame.setLayout(grid0) # Plot Options - self.cncplot_method_label = FCLabel("%s: " % _("Plot Options")) + self.cncplot_method_label = FCLabel('%s: ' % _("Plot Options"), bold=True) self.cncplot_method_label.setToolTip( _( "This selects the kind of geometries on the canvas to plot.\n" @@ -1319,7 +1319,7 @@ class CNCObjectUI(ObjectUI): grid0.addLayout(self.name_hlay, 2, 0, 1, 3) # ## Object name - name_label = FCLabel("%s: " % _("Name")) + name_label = FCLabel('%s: ' % _("Name"), bold=True) self.name_entry = FCEntry() self.name_entry.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus) @@ -1387,7 +1387,7 @@ class CNCObjectUI(ObjectUI): grid_par.addWidget(self.estimated_frame, 4, 0, 1, 3) # Travelled Distance - self.t_distance_label = FCLabel("%s:" % _("Travelled distance")) + self.t_distance_label = FCLabel('%s:' % _("Travelled distance"), bold=True) self.t_distance_label.setToolTip( _("This is the total travelled distance on X-Y plane.\n" "In current units.") @@ -1400,7 +1400,7 @@ class CNCObjectUI(ObjectUI): estimated_grid.addWidget(self.units_label, 0, 2) # Estimated Time - self.t_time_label = FCLabel("%s:" % _("Estimated time")) + self.t_time_label = FCLabel('%s:' % _("Estimated time"), bold=True) self.t_time_label.setToolTip( _("This is the estimated time to do the routing/drilling,\n" "without the time spent in ToolChange events.") @@ -1456,7 +1456,7 @@ class CNCObjectUI(ObjectUI): grid1.addLayout(hlay, 0, 0, 1, 2) # CNC Tools Table for plot - self.cnc_tools_table_label = FCLabel('%s' % _('CNC Tools Table')) + self.cnc_tools_table_label = FCLabel('%s' % _('CNC Tools Table'), bold=True) self.cnc_tools_table_label.setToolTip( _( "Tools in this CNCJob object used for cutting.\n" @@ -1602,7 +1602,7 @@ class ScriptObjectUI(ObjectUI): self.name_hlay = QtWidgets.QHBoxLayout() self.custom_box.addLayout(self.name_hlay) - name_label = FCLabel("%s:" % _("Name")) + name_label = FCLabel('%s:' % _("Name"), bold=True) self.name_entry = FCEntry() self.name_entry.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus) self.name_hlay.addWidget(name_label) @@ -1669,7 +1669,7 @@ class DocumentObjectUI(ObjectUI): self.name_hlay = QtWidgets.QHBoxLayout() self.custom_box.addLayout(self.name_hlay) - name_label = FCLabel("%s:" % _("Name")) + name_label = FCLabel('%s:' % _("Name"), bold=True) self.name_entry = FCEntry() self.name_entry.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus) self.name_hlay.addWidget(name_label) diff --git a/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py index 3c0f5fdb..c62b2296 100644 --- a/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py +++ b/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py @@ -38,7 +38,7 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI): param_frame.setLayout(param_grid) # ### Milling Holes ## ## - self.mill_hole_label = FCLabel('%s' % _('Mill Holes')) + self.mill_hole_label = FCLabel('%s' % _('Mill Holes'), bold=True) self.mill_hole_label.setToolTip( _("Create Geometry for milling holes.") ) diff --git a/appGUI/preferences/general/GeneralAPPSetGroupUI.py b/appGUI/preferences/general/GeneralAPPSetGroupUI.py index 2fed76d5..e9657a12 100644 --- a/appGUI/preferences/general/GeneralAPPSetGroupUI.py +++ b/appGUI/preferences/general/GeneralAPPSetGroupUI.py @@ -408,7 +408,7 @@ class GeneralAPPSetGroupUI(OptionsGroupUI): # ############################################################################################################# # Parameters Frame # ############################################################################################################# - self.par_label = FCLabel('%s' % (self.app.theme_safe_color('blue'), _('Parameters'))) + self.par_label = FCLabel('%s' % _("Parameters"), color='blue', bold=True) self.layout.addWidget(self.par_label) par_frame = FCFrame() diff --git a/appGUI/preferences/general/GeneralAppPrefGroupUI.py b/appGUI/preferences/general/GeneralAppPrefGroupUI.py index ef32a068..a5346b49 100644 --- a/appGUI/preferences/general/GeneralAppPrefGroupUI.py +++ b/appGUI/preferences/general/GeneralAppPrefGroupUI.py @@ -89,7 +89,7 @@ class GeneralAppPrefGroupUI(OptionsGroupUI): grid1_frame.setLayout(grid1) # Graphic Engine for FlatCAM - self.ge_label = FCLabel('%s:' % _('Graphic Engine')) + self.ge_label = FCLabel('%s:' % _('Graphic Engine'), bold=True) self.ge_label.setToolTip(_("Choose what graphic engine to use in FlatCAM.\n" "Legacy(2D) -> reduced functionality, slow performance but enhanced compatibility.\n" "OpenGL(3D) -> full functionality, high performance\n" diff --git a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py index 5652f44b..bec7d99e 100644 --- a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py +++ b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py @@ -35,7 +35,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): par_frame.setLayout(grid0) # Theme selection - self.appearance_label = FCLabel('%s' % _('Theme')) + self.appearance_label = FCLabel('%s' % _('Theme'), bold=True) self.appearance_label.setToolTip( _("Select a theme for the application.\n" "It will theme the plot area.") @@ -161,7 +161,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): color_frame.setLayout(grid1) # Plot Selection (left - right) Color - self.sel_lr_label = FCLabel('%s' % _('Left-Right Selection Color')) + self.sel_lr_label = FCLabel('%s' % _('Left-Right Selection Color'), bold=True) grid1.addWidget(self.sel_lr_label, 0, 0, 1, 2) self.sl_color_label = FCLabel('%s:' % _('Outline')) @@ -201,7 +201,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): grid1.addWidget(separator_line, 8, 0, 1, 2) # Plot Selection (left - right) Color - self.sel_rl_label = FCLabel('%s' % _('Right-Left Selection Color')) + self.sel_rl_label = FCLabel('%s' % _('Right-Left Selection Color'), bold=True) grid1.addWidget(self.sel_rl_label, 10, 0, 1, 2) # Plot Selection (right - left) Line Color @@ -246,7 +246,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): # ----------------------- Editor Color ----------------------------- # ------------------------------------------------------------------ - self.editor_color_label = FCLabel('%s' % _('Editor Color')) + self.editor_color_label = FCLabel('%s' % _('Editor Color'), bold=True) grid1.addWidget(self.editor_color_label, 20, 0, 1, 2) # Editor Draw Color @@ -278,7 +278,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): # ----------------------- Project Settings ----------------------------- # ------------------------------------------------------------------ # Light Theme - self.proj_settings_l_label = FCLabel('%s - %s' % (_('Project Items Color'), _("Light"))) + self.proj_settings_l_label = FCLabel('%s' % _("Light"), bold=True) grid1.addWidget(self.proj_settings_l_label, 28, 0, 1, 2) # Project Tab items color @@ -310,7 +310,7 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): grid1.addWidget(separator_line, 33, 0, 1, 2) # Dark Theme - self.proj_settings_d_label = FCLabel('%s - %s' % (_('Project Items Color'), _("Dark"))) + self.proj_settings_d_label = FCLabel('%s' % _("Dark"), bold=True) grid1.addWidget(self.proj_settings_d_label, 34, 0, 1, 2) # Project Tab items color diff --git a/appGUI/preferences/tools/Tools2CThievingPrefGroupUI.py b/appGUI/preferences/tools/Tools2CThievingPrefGroupUI.py index 4c85b0ea..c274284d 100644 --- a/appGUI/preferences/tools/Tools2CThievingPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2CThievingPrefGroupUI.py @@ -142,7 +142,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI): # ############################################################################################################# # DOTS Grid Parameters Frame # ############################################################################################################# - self.dots_label = FCLabel('%s:' % _("Dots Grid Parameters")) + self.dots_label = FCLabel('%s' % _("Dots Grid Parameters"), bold=True) self.layout.addWidget(self.dots_label) dots_frame = FCFrame() @@ -181,7 +181,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI): # ############################################################################################################# # Squares Grid Parameters Frame # ############################################################################################################# - self.squares_label = FCLabel('%s:' % _("Squares Grid Parameters")) + self.squares_label = FCLabel('%s' % _("Squares Grid Parameters"), bold=True) self.layout.addWidget(self.squares_label) square_frame = FCFrame() @@ -220,7 +220,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI): # ############################################################################################################# # Lines Grid Parameters Frame # ############################################################################################################# - self.lines_label = FCLabel('%s:' % _("Lines Grid Parameters")) + self.lines_label = FCLabel('%s' % _("Lines Grid Parameters"), bold=True) self.layout.addWidget(self.lines_label) line_frame = FCFrame() diff --git a/appGUI/preferences/tools/ToolsISOPrefGroupUI.py b/appGUI/preferences/tools/ToolsISOPrefGroupUI.py index c0fdd5a4..0a041e38 100644 --- a/appGUI/preferences/tools/ToolsISOPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsISOPrefGroupUI.py @@ -39,7 +39,7 @@ class ToolsISOPrefGroupUI(OptionsGroupUI): par_frame.setLayout(par_grid) # Tool Dias - isotdlabel = FCLabel('%s:' % _('Tools Dia')) + isotdlabel = FCLabel('%s:' % _('Tools Dia'), color='green', bold=True) isotdlabel.setToolTip( _("Diameters of the tools, separated by comma.\n" "The value of the diameter has to use the dot decimals separator.\n" diff --git a/appGUI/preferences/tools/ToolsMillPrefGroupUI.py b/appGUI/preferences/tools/ToolsMillPrefGroupUI.py index 65cd74ea..00793fb0 100644 --- a/appGUI/preferences/tools/ToolsMillPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsMillPrefGroupUI.py @@ -38,7 +38,7 @@ class ToolsMillPrefGroupUI(OptionsGroupUI): param_frame.setLayout(param_grid) # Tooldia - tdlabel = FCLabel('%s:' % _('Tools Dia')) + tdlabel = FCLabel('%s:' % _('Tools Dia'), color='green', bold=True) tdlabel.setToolTip( _("Diameters of the tools, separated by comma.\n" "The value of the diameter has to use the dot decimals separator.\n" diff --git a/appGUI/preferences/tools/ToolsNCCPrefGroupUI.py b/appGUI/preferences/tools/ToolsNCCPrefGroupUI.py index b2dddf3f..c547ebb5 100644 --- a/appGUI/preferences/tools/ToolsNCCPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsNCCPrefGroupUI.py @@ -40,7 +40,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI): par_frame.setLayout(par_grid) # Tools Diameters - ncctdlabel = FCLabel('%s:' % _('Tools Dia')) + ncctdlabel = FCLabel('%s:' % _('Tools Dia'), color='green', bold=True) ncctdlabel.setToolTip( _("Diameters of the tools, separated by comma.\n" "The value of the diameter has to use the dot decimals separator.\n" diff --git a/appGUI/preferences/tools/ToolsPaintPrefGroupUI.py b/appGUI/preferences/tools/ToolsPaintPrefGroupUI.py index 85cbfc0a..789de600 100644 --- a/appGUI/preferences/tools/ToolsPaintPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsPaintPrefGroupUI.py @@ -42,7 +42,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI): par_frame.setLayout(param_grid) # Tool dia - ptdlabel = FCLabel('%s:' % _('Tools Dia')) + ptdlabel = FCLabel('%s:' % _('Tools Dia'), color='green', bold=True) ptdlabel.setToolTip( _("Diameters of the tools, separated by comma.\n" "The value of the diameter has to use the dot decimals separator.\n" diff --git a/appGUI/preferences/tools/ToolsSolderpastePrefGroupUI.py b/appGUI/preferences/tools/ToolsSolderpastePrefGroupUI.py index 0349b352..d4a83813 100644 --- a/appGUI/preferences/tools/ToolsSolderpastePrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsSolderpastePrefGroupUI.py @@ -39,7 +39,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI): param_frame.setLayout(param_grid) # Nozzle Tool Diameters - nozzletdlabel = FCLabel('%s:' % _('Tools Dia')) + nozzletdlabel = FCLabel('%s:' % _('Tools Dia'), color='green', bold=True) nozzletdlabel.setToolTip( _("Diameters of the tools, separated by comma.\n" "The value of the diameter has to use the dot decimals separator.\n" @@ -51,7 +51,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI): param_grid.addWidget(self.nozzle_tool_dia_entry, 0, 1) # New Nozzle Tool Dia - self.addtool_entry_lbl = FCLabel('%s:' % _('New Nozzle Dia')) + self.addtool_entry_lbl = FCLabel('%s:' % _('New Nozzle Dia'), bold=True) self.addtool_entry_lbl.setToolTip( _("Diameter for the new tool to add in the Tool Table") ) diff --git a/appGUI/preferences/utilities/AutoCompletePrefGroupUI.py b/appGUI/preferences/utilities/AutoCompletePrefGroupUI.py index ee8f2e88..93139239 100644 --- a/appGUI/preferences/utilities/AutoCompletePrefGroupUI.py +++ b/appGUI/preferences/utilities/AutoCompletePrefGroupUI.py @@ -33,7 +33,7 @@ class AutoCompletePrefGroupUI(OptionsGroupUI): hlay0.addWidget(self.del_all_btn) # ## Gerber associations - self.grb_list_label = FCLabel("%s:" % _("Keywords list")) + self.grb_list_label = FCLabel('%s:' % _("Keywords list"), bold=True) self.grb_list_label.setToolTip( _("List of keywords used by\n" "the autocompleter in FlatCAM.\n" diff --git a/appGUI/preferences/utilities/FAExcPrefGroupUI.py b/appGUI/preferences/utilities/FAExcPrefGroupUI.py index 8e3c1c8e..68a6a5f7 100644 --- a/appGUI/preferences/utilities/FAExcPrefGroupUI.py +++ b/appGUI/preferences/utilities/FAExcPrefGroupUI.py @@ -43,7 +43,7 @@ class FAExcPrefGroupUI(OptionsGroupUI): self.vertical_lay.addLayout(hlay0) # # ## Excellon associations - list_label = FCLabel("%s:" % _("Extensions list")) + list_label = FCLabel('%s:' % _("Extensions list"), bold=True) list_label.setToolTip( _("List of file extensions to be\n" "associated with FlatCAM.") diff --git a/appGUI/preferences/utilities/FAGcoPrefGroupUI.py b/appGUI/preferences/utilities/FAGcoPrefGroupUI.py index 84697c77..9df84f31 100644 --- a/appGUI/preferences/utilities/FAGcoPrefGroupUI.py +++ b/appGUI/preferences/utilities/FAGcoPrefGroupUI.py @@ -34,7 +34,7 @@ class FAGcoPrefGroupUI(OptionsGroupUI): hlay0.addWidget(self.del_all_btn) # ## G-Code associations - self.gco_list_label = FCLabel("%s:" % _("Extensions list")) + self.gco_list_label = FCLabel('%s:' % _("Extensions list"), bold=True) self.gco_list_label.setToolTip( _("List of file extensions to be\n" "associated with FlatCAM.") diff --git a/appGUI/preferences/utilities/FAGrbPrefGroupUI.py b/appGUI/preferences/utilities/FAGrbPrefGroupUI.py index fe1dbf53..dcec8eca 100644 --- a/appGUI/preferences/utilities/FAGrbPrefGroupUI.py +++ b/appGUI/preferences/utilities/FAGrbPrefGroupUI.py @@ -33,7 +33,7 @@ class FAGrbPrefGroupUI(OptionsGroupUI): hlay0.addWidget(self.del_all_btn) # ## Gerber associations - self.grb_list_label = FCLabel("%s:" % _("Extensions list")) + self.grb_list_label = FCLabel('%s:' % _("Extensions list"), bold=True) self.grb_list_label.setToolTip( _("List of file extensions to be\n" "associated with FlatCAM.") diff --git a/appMain.py b/appMain.py index b44f8a25..8632f289 100644 --- a/appMain.py +++ b/appMain.py @@ -268,24 +268,6 @@ class App(QtCore.QObject): # used when loading a project and restoring objects restore_project_objects_sig = pyqtSignal(object, str, bool, bool) - # Mapping of colors used for text on Light theme to - # similar colors safe for use on Dark theme - # 'input_color': (light_color, dark_color), - theme_safe_colors = { - "blue": "#1F80FF", - "brown": "#CC9966", - "darkgreen": "#008015", - "darkorange": "darkorange", - "green": "#00CC22", - "indigo": "#9457EB", - "magenta": "magenta", - "orange": "orange", - "purple": "#B284BE", - "red": "salmon", - "teal": "teal", - "tomato": "tomato", - } - def __init__(self, qapp, user_defaults=True): """ Starts the application. @@ -1911,146 +1893,132 @@ class App(QtCore.QObject): self.shell = FCShell(app=self, version=self.version) self.log.debug("TCL was re-instantiated. TCL variables are reset.") - # The menu bar theming differs between operating systems - # Windows menu theme is controlled by the application - # MacOS menu theme is controlled by OS - if sys.platform == 'win32': - if self.options["global_theme"] == 'light': - menu_resource_location = 'assets/resources' - else: - menu_resource_location = 'assets/resources/dark_resources' - else: - if darkdetect.isLight(): - menu_resource_location = 'assets/resources' - else: - menu_resource_location = 'assets/resources/dark_resources' - self.distance_tool = Distance(self) - self.distance_tool.install(icon=QtGui.QIcon(menu_resource_location + '/distance16.png'), pos=self.ui.menuedit, + self.distance_tool.install(icon=QtGui.QIcon(self.resource_location + '/distance16.png'), pos=self.ui.menuedit, before=self.ui.menuedit_numeric_move, separator=False) self.distance_min_tool = ObjectDistance(self) - self.distance_min_tool.install(icon=QtGui.QIcon(menu_resource_location + '/distance_min16.png'), + self.distance_min_tool.install(icon=QtGui.QIcon(self.resource_location + '/distance_min16.png'), pos=self.ui.menuedit, before=self.ui.menuedit_numeric_move, separator=True) self.dblsidedtool = DblSidedTool(self) - self.dblsidedtool.install(icon=QtGui.QIcon(menu_resource_location + '/doubleside16.png'), separator=False) + self.dblsidedtool.install(icon=QtGui.QIcon(self.resource_location + '/doubleside16.png'), separator=False) self.cal_exc_tool = ToolCalibration(self) - self.cal_exc_tool.install(icon=QtGui.QIcon(menu_resource_location + '/calibrate_16.png'), + self.cal_exc_tool.install(icon=QtGui.QIcon(self.resource_location + '/calibrate_16.png'), pos=self.ui.menu_plugins, before=self.dblsidedtool.menuAction, separator=False) self.align_objects_tool = AlignObjects(self) - self.align_objects_tool.install(icon=QtGui.QIcon(menu_resource_location + '/align16.png'), separator=False) + self.align_objects_tool.install(icon=QtGui.QIcon(self.resource_location + '/align16.png'), separator=False) self.extract_tool = ToolExtract(self) - self.extract_tool.install(icon=QtGui.QIcon(menu_resource_location + '/extract32.png'), separator=True) + self.extract_tool.install(icon=QtGui.QIcon(self.resource_location + '/extract32.png'), separator=True) self.panelize_tool = Panelize(self) - self.panelize_tool.install(icon=QtGui.QIcon(menu_resource_location + '/panelize16.png')) + self.panelize_tool.install(icon=QtGui.QIcon(self.resource_location + '/panelize16.png')) self.film_tool = Film(self) - self.film_tool.install(icon=QtGui.QIcon(menu_resource_location + '/film32.png')) + self.film_tool.install(icon=QtGui.QIcon(self.resource_location + '/film32.png')) self.paste_tool = SolderPaste(self) - self.paste_tool.install(icon=QtGui.QIcon(menu_resource_location + '/solderpastebis32.png')) + self.paste_tool.install(icon=QtGui.QIcon(self.resource_location + '/solderpastebis32.png')) self.calculator_tool = ToolCalculator(self) - self.calculator_tool.install(icon=QtGui.QIcon(menu_resource_location + '/calculator16.png'), separator=True) + self.calculator_tool.install(icon=QtGui.QIcon(self.resource_location + '/calculator16.png'), separator=True) self.sub_tool = ToolSub(self) - self.sub_tool.install(icon=QtGui.QIcon(menu_resource_location + '/sub32.png'), + self.sub_tool.install(icon=QtGui.QIcon(self.resource_location + '/sub32.png'), pos=self.ui.menu_plugins, separator=True) self.rules_tool = RulesCheck(self) - self.rules_tool.install(icon=QtGui.QIcon(menu_resource_location + '/rules32.png'), + self.rules_tool.install(icon=QtGui.QIcon(self.resource_location + '/rules32.png'), pos=self.ui.menu_plugins, separator=False) self.optimal_tool = ToolOptimal(self) - self.optimal_tool.install(icon=QtGui.QIcon(menu_resource_location + '/open_excellon32.png'), + self.optimal_tool.install(icon=QtGui.QIcon(self.resource_location + '/open_excellon32.png'), pos=self.ui.menu_plugins, separator=True) self.move_tool = ToolMove(self) - self.move_tool.install(icon=QtGui.QIcon(menu_resource_location + '/move16.png'), pos=self.ui.menuedit, + self.move_tool.install(icon=QtGui.QIcon(self.resource_location + '/move16.png'), pos=self.ui.menuedit, before=self.ui.menuedit_numeric_move, separator=True) self.cutout_tool = CutOut(self) - self.cutout_tool.install(icon=QtGui.QIcon(menu_resource_location + '/cut32.png'), pos=self.ui.menu_plugins, + self.cutout_tool.install(icon=QtGui.QIcon(self.resource_location + '/cut32.png'), pos=self.ui.menu_plugins, before=self.sub_tool.menuAction) self.ncclear_tool = NonCopperClear(self) - self.ncclear_tool.install(icon=QtGui.QIcon(menu_resource_location + '/ncc32.png'), pos=self.ui.menu_plugins, + self.ncclear_tool.install(icon=QtGui.QIcon(self.resource_location + '/ncc32.png'), pos=self.ui.menu_plugins, before=self.sub_tool.menuAction, separator=True) self.paint_tool = ToolPaint(self) - self.paint_tool.install(icon=QtGui.QIcon(menu_resource_location + '/paint20_1.png'), pos=self.ui.menu_plugins, + self.paint_tool.install(icon=QtGui.QIcon(self.resource_location + '/paint20_1.png'), pos=self.ui.menu_plugins, before=self.sub_tool.menuAction, separator=True) self.isolation_tool = ToolIsolation(self) - self.isolation_tool.install(icon=QtGui.QIcon(menu_resource_location + '/iso_16.png'), pos=self.ui.menu_plugins, + self.isolation_tool.install(icon=QtGui.QIcon(self.resource_location + '/iso_16.png'), pos=self.ui.menu_plugins, before=self.sub_tool.menuAction, separator=True) self.follow_tool = ToolFollow(self) - self.follow_tool.install(icon=QtGui.QIcon(menu_resource_location + '/follow32.png'), pos=self.ui.menu_plugins, + self.follow_tool.install(icon=QtGui.QIcon(self.resource_location + '/follow32.png'), pos=self.ui.menu_plugins, before=self.sub_tool.menuAction, separator=True) self.drilling_tool = ToolDrilling(self) - self.drilling_tool.install(icon=QtGui.QIcon(menu_resource_location + '/extract_drill32.png'), + self.drilling_tool.install(icon=QtGui.QIcon(self.resource_location + '/extract_drill32.png'), pos=self.ui.menu_plugins, before=self.sub_tool.menuAction, separator=True) self.milling_tool = ToolMilling(self) - self.milling_tool.install(icon=QtGui.QIcon(menu_resource_location + '/milling_tool32.png'), + self.milling_tool.install(icon=QtGui.QIcon(self.resource_location + '/milling_tool32.png'), pos=self.ui.menu_plugins, before=self.sub_tool.menuAction, separator=True) self.levelling_tool = ToolLevelling(self) - self.levelling_tool.install(icon=QtGui.QIcon(menu_resource_location + '/level32.png'), + self.levelling_tool.install(icon=QtGui.QIcon(self.resource_location + '/level32.png'), pos=self.ui.menuoptions_experimental, separator=True) self.copper_thieving_tool = ToolCopperThieving(self) - self.copper_thieving_tool.install(icon=QtGui.QIcon(menu_resource_location + '/copperfill32.png'), + self.copper_thieving_tool.install(icon=QtGui.QIcon(self.resource_location + '/copperfill32.png'), pos=self.ui.menu_plugins) self.fiducial_tool = ToolFiducials(self) - self.fiducial_tool.install(icon=QtGui.QIcon(menu_resource_location + '/fiducials_32.png'), + self.fiducial_tool.install(icon=QtGui.QIcon(self.resource_location + '/fiducials_32.png'), pos=self.ui.menu_plugins) self.qrcode_tool = QRCode(self) - self.qrcode_tool.install(icon=QtGui.QIcon(menu_resource_location + '/qrcode32.png'), + self.qrcode_tool.install(icon=QtGui.QIcon(self.resource_location + '/qrcode32.png'), pos=self.ui.menu_plugins) self.punch_tool = ToolPunchGerber(self) - self.punch_tool.install(icon=QtGui.QIcon(menu_resource_location + '/punch32.png'), pos=self.ui.menu_plugins) + self.punch_tool.install(icon=QtGui.QIcon(self.resource_location + '/punch32.png'), pos=self.ui.menu_plugins) self.invert_tool = ToolInvertGerber(self) - self.invert_tool.install(icon=QtGui.QIcon(menu_resource_location + '/invert32.png'), pos=self.ui.menu_plugins) + self.invert_tool.install(icon=QtGui.QIcon(self.resource_location + '/invert32.png'), pos=self.ui.menu_plugins) self.markers_tool = ToolMarkers(self) - self.markers_tool.install(icon=QtGui.QIcon(menu_resource_location + '/corners_32.png'), + self.markers_tool.install(icon=QtGui.QIcon(self.resource_location + '/corners_32.png'), pos=self.ui.menu_plugins) self.etch_tool = ToolEtchCompensation(self) - self.etch_tool.install(icon=QtGui.QIcon(menu_resource_location + '/etch_32.png'), pos=self.ui.menu_plugins) + self.etch_tool.install(icon=QtGui.QIcon(self.resource_location + '/etch_32.png'), pos=self.ui.menu_plugins) self.transform_tool = ToolTransform(self) - self.transform_tool.install(icon=QtGui.QIcon(menu_resource_location + '/transform.png'), + self.transform_tool.install(icon=QtGui.QIcon(self.resource_location + '/transform.png'), pos=self.ui.menuoptions, separator=True) self.report_tool = ObjectReport(self) - self.report_tool.install(icon=QtGui.QIcon(menu_resource_location + '/properties32.png'), + self.report_tool.install(icon=QtGui.QIcon(self.resource_location + '/properties32.png'), pos=self.ui.menuoptions) self.pdf_tool = ToolPDF(self) - self.pdf_tool.install(icon=QtGui.QIcon(menu_resource_location + '/pdf32.png'), + self.pdf_tool.install(icon=QtGui.QIcon(self.resource_location + '/pdf32.png'), pos=self.ui.menufileimport, separator=True) try: self.image_tool = ToolImage(self) - self.image_tool.install(icon=QtGui.QIcon(menu_resource_location + '/image32.png'), + self.image_tool.install(icon=QtGui.QIcon(self.resource_location + '/image32.png'), pos=self.ui.menufileimport, separator=True) except Exception as im_err: @@ -2058,7 +2026,7 @@ class App(QtCore.QObject): self.image_tool = lambda x: None self.pcb_wizard_tool = PcbWizard(self) - self.pcb_wizard_tool.install(icon=QtGui.QIcon(menu_resource_location + '/drill32.png'), + self.pcb_wizard_tool.install(icon=QtGui.QIcon(self.resource_location + '/drill32.png'), pos=self.ui.menufileimport) # create a list of plugins references @@ -9472,23 +9440,7 @@ class App(QtCore.QObject): return float('%.*f' % (dec_nr, float(val))) - def theme_safe_color(self, color): - """ - Some colors do not work well with light or dark backgrounds making them unreadable in the wrong - theme. For an approved color value this will return a similar color better suited for the current theme. - :param color: color to be replaced - :return: similar color better suited for dark or light theme - """ - - if color in self.theme_safe_colors: - if self.options['global_theme'] == 'light': - return color - else: - return self.theme_safe_colors[color] - else: - # Arbitratily selected fail-safe color - return 'green' class ArgsThread(QtCore.QObject): open_signal = pyqtSignal(list) diff --git a/appPlugins/ToolAlignObjects.py b/appPlugins/ToolAlignObjects.py index c8f1bfdb..d8e95ace 100644 --- a/appPlugins/ToolAlignObjects.py +++ b/appPlugins/ToolAlignObjects.py @@ -503,7 +503,7 @@ class AlignUI: par_frame.setLayout(grid2) # Alignment Type - self.a_type_lbl = FCLabel('%s:' % _("Alignment Type")) + self.a_type_lbl = FCLabel('%s:' % _("Alignment Type"), bold=True) self.a_type_lbl.setToolTip( _("The type of alignment can be:\n" "- Single Point -> it require a single point of sync, the action will be a translation\n" diff --git a/appPlugins/ToolCalibration.py b/appPlugins/ToolCalibration.py index a265562d..a897b58d 100644 --- a/appPlugins/ToolCalibration.py +++ b/appPlugins/ToolCalibration.py @@ -767,7 +767,7 @@ class CalibrationUI: grid_lay = GLay(v_spacing=5, h_spacing=3, c_stretch=[0, 1, 0]) self.layout.addLayout(grid_lay) - self.gcode_title_label = FCLabel('%s:' % _('Parameters')) + self.gcode_title_label = FCLabel('%s:' % _('Parameters'), bold=True) self.gcode_title_label.setToolTip( _("Parameters used when creating the GCode in this tool.") ) @@ -873,7 +873,7 @@ class CalibrationUI: grid_lay.addWidget(FCLabel(''), 9, 0, 1, 3) - step_1 = FCLabel('%s' % _("STEP 1: Acquire Calibration Points")) + step_1 = FCLabel('%s' % _("STEP 1: Acquire Calibration Points"), bold=True) step_1.setToolTip( _("Pick four points by clicking on canvas.\n" "Those four points should be in the four\n" @@ -881,7 +881,7 @@ class CalibrationUI: ) grid_lay.addWidget(step_1, 10, 0, 1, 3) - self.cal_source_lbl = FCLabel("%s:" % _("Source Type")) + self.cal_source_lbl = FCLabel('%s:' % _("Source Type"), bold=True) self.cal_source_lbl.setToolTip(_("The source of calibration points.\n" "It can be:\n" "- Object -> click a hole geo for Excellon or a pad for Gerber\n" @@ -918,7 +918,7 @@ class CalibrationUI: grid_lay.addWidget(self.object_label, 13, 0, 1, 3) grid_lay.addWidget(self.object_combo, 14, 0, 1, 3) - self.points_table_label = FCLabel('%s' % _('Calibration Points')) + self.points_table_label = FCLabel('%s' % _('Calibration Points'), bold=True) self.points_table_label.setToolTip( _("Contain the expected calibration points and the\n" "ones measured.") @@ -1090,7 +1090,7 @@ class CalibrationUI: grid_lay.addWidget(FCLabel(''), 19, 0) # STEP 2 # - step_2 = FCLabel('%s' % _("STEP 2: Verification GCode")) + step_2 = FCLabel('%s' % _("STEP 2: Verification GCode"), bold=True) step_2.setToolTip( _("Generate GCode file to locate and align the PCB by using\n" "the four points acquired above.\n" @@ -1129,7 +1129,7 @@ class CalibrationUI: grid_lay.addWidget(FCLabel(''), 23, 0, 1, 3) # STEP 3 # - step_3 = FCLabel('%s' % _("STEP 3: Adjustments")) + step_3 = FCLabel('%s' % _("STEP 3: Adjustments"), bold=True) step_3.setToolTip( _("Calculate Scale and Skew factors based on the differences (delta)\n" "found when checking the PCB pattern. The differences must be filled\n" @@ -1160,7 +1160,7 @@ class CalibrationUI: grid_lay.addWidget(FCLabel(''), 27, 0, 1, 3) # STEP 4 # - step_4 = FCLabel('%s' % _("STEP 4: Adjusted GCode")) + step_4 = FCLabel('%s' % _("STEP 4: Adjusted GCode"), bold=True) step_4.setToolTip( _("Generate verification GCode file adjusted with\n" "the factors above.") @@ -1241,7 +1241,7 @@ class CalibrationUI: """) grid_lay.addWidget(self.skew_button, 34, 0, 1, 3) - # final_factors_lbl = FCLabel('%s' % _("Final Factors")) + # final_factors_lbl = FCLabel('%s' % _("Final Factors"), bold=True) # final_factors_lbl.setToolTip( # _("Generate verification GCode file adjusted with\n" # "the factors above.") @@ -1323,7 +1323,7 @@ class CalibrationUI: grid_lay.addWidget(FCLabel(''), 44, 0, 1, 3) # STEP 5 # - step_5 = FCLabel('%s' % _("STEP 5: Calibrate FlatCAM Objects")) + step_5 = FCLabel('%s' % _("STEP 5: Calibrate FlatCAM Objects"), bold=True) step_5.setToolTip( _("Adjust the FlatCAM objects\n" "with the factors determined and verified above.") diff --git a/appPlugins/ToolCopperThieving.py b/appPlugins/ToolCopperThieving.py index debcf626..9d03c758 100644 --- a/appPlugins/ToolCopperThieving.py +++ b/appPlugins/ToolCopperThieving.py @@ -1449,7 +1449,7 @@ class ThievingUI: separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) dots_grid.addWidget(separator_line, 0, 0, 1, 2) - self.dots_label = FCLabel('%s:' % _("Dots Grid Parameters")) + self.dots_label = FCLabel('%s' % _("Dots Grid Parameters"), bold=True) dots_grid.addWidget(self.dots_label, 2, 0, 1, 2) # Dot diameter # @@ -1495,7 +1495,7 @@ class ThievingUI: separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) squares_grid.addWidget(separator_line, 0, 0, 1, 2) - self.squares_label = FCLabel('%s:' % _("Squares Grid Parameters")) + self.squares_label = FCLabel('%s' % _("Squares Grid Parameters"), bold=True) squares_grid.addWidget(self.squares_label, 2, 0, 1, 2) # Square Size # @@ -1541,7 +1541,7 @@ class ThievingUI: separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) lines_grid.addWidget(separator_line, 0, 0, 1, 2) - self.lines_label = FCLabel('%s:' % _("Lines Grid Parameters")) + self.lines_label = FCLabel('%s' % _("Lines Grid Parameters"), bold=True) lines_grid.addWidget(self.lines_label, 2, 0, 1, 2) # Line Size # diff --git a/appPlugins/ToolDblSided.py b/appPlugins/ToolDblSided.py index a4149570..8643adb6 100644 --- a/appPlugins/ToolDblSided.py +++ b/appPlugins/ToolDblSided.py @@ -884,7 +884,7 @@ class DsidedUI: grid_mirror.addWidget(separator_line, 3, 0, 1, 3) # ## Reference - self.axloc_label = FCLabel('%s:' % _("Reference")) + self.axloc_label = FCLabel('%s' % _("Reference"), bold=True) self.axloc_label.setToolTip( _("The coordinates used as reference for the mirror operation.\n" "Can be:\n" @@ -980,7 +980,7 @@ class DsidedUI: grid_snap_ref.setContentsMargins(0, 0, 0, 0) self.sr_frame.setLayout(grid_snap_ref) - self.exc_hole_lbl = FCLabel('%s:' % _("Excellon")) + self.exc_hole_lbl = FCLabel('%s' % _("Excellon"), bold=True) self.exc_hole_lbl.setToolTip( _("Object that holds holes that can be picked as reference for mirroring.") ) diff --git a/appPlugins/ToolDistance.py b/appPlugins/ToolDistance.py index 6395f4be..e27d3697 100644 --- a/appPlugins/ToolDistance.py +++ b/appPlugins/ToolDistance.py @@ -963,7 +963,7 @@ class DistanceUI: res_grid.addWidget(separator_line, 8, 0, 1, 3) # Distance - self.total_distance_label = FCLabel("%s:" % _('DISTANCE')) + self.total_distance_label = FCLabel('%s:' % _('DISTANCE'), bold=True) self.total_distance_label.setToolTip(_("This is the point to point Euclidian distance.")) self.total_distance_entry = FCEntry() diff --git a/appPlugins/ToolExtract.py b/appPlugins/ToolExtract.py index 9585784c..b8e6cbf4 100644 --- a/appPlugins/ToolExtract.py +++ b/appPlugins/ToolExtract.py @@ -1186,7 +1186,7 @@ class ExtractUI: self.ring_box.addLayout(ring_grid) # Annular Ring value - self.ring_label = FCLabel('%s' % _("Fixed Annular Ring")) + self.ring_label = FCLabel('%s' % _("Fixed Annular Ring"), bold=True) self.ring_label.setToolTip( _("The size of annular ring.\n" "The copper sliver between the hole exterior\n" @@ -1271,7 +1271,7 @@ class ExtractUI: self.fix_frame.setLayout(fixed_grid) # Fixed Diameter - self.fixed_label = FCLabel('%s' % _("Fixed Diameter")) + self.fixed_label = FCLabel('%s' % _("Fixed Diameter"), bold=True) fixed_grid.addWidget(self.fixed_label, 2, 0, 1, 2) # Diameter value @@ -1299,7 +1299,7 @@ class ExtractUI: self.prop_frame.setLayout(prop_grid) # Proportional Diameter - self.prop_label = FCLabel('%s' % _("Proportional Diameter")) + self.prop_label = FCLabel('%s' % _("Proportional Diameter"), bold=True) prop_grid.addWidget(self.prop_label, 0, 0, 1, 2) # Diameter value diff --git a/appPlugins/ToolImage.py b/appPlugins/ToolImage.py index 233b353b..18791c24 100644 --- a/appPlugins/ToolImage.py +++ b/appPlugins/ToolImage.py @@ -346,7 +346,7 @@ class ImageUI: # Type of image interpretation self.image_type = RadioSet([{'label': 'B/W', 'value': 'black'}, {'label': 'Color', 'value': 'color'}]) - self.image_type_label = FCLabel("%s:" % _('Image type')) + self.image_type_label = FCLabel('%s:' % _('Image type'), bold=True) self.image_type_label.setToolTip( _("Choose a method for the image interpretation.\n" "B/W means a black & white image. Color means a colored image.") diff --git a/appPlugins/ToolIsolation.py b/appPlugins/ToolIsolation.py index 8dbc70c5..acdc7e0e 100644 --- a/appPlugins/ToolIsolation.py +++ b/appPlugins/ToolIsolation.py @@ -3470,7 +3470,7 @@ class IsoUI: separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) new_tool_grid.addWidget(separator_line, 0, 0, 1, 3) - self.tool_sel_label = FCLabel('%s' % _('Add from DB')) + self.tool_sel_label = FCLabel('%s' % _('Add from DB'), bold=True) new_tool_grid.addWidget(self.tool_sel_label, 2, 0, 1, 3) # ### Tool Diameter #### diff --git a/appPlugins/ToolLevelling.py b/appPlugins/ToolLevelling.py index f99f5a3d..c8393041 100644 --- a/appPlugins/ToolLevelling.py +++ b/appPlugins/ToolLevelling.py @@ -1794,7 +1794,7 @@ class LevelUI: grid0 = GLay(v_spacing=5, h_spacing=3) self.al_box.addLayout(grid0) - self.al_title = FCLabel('%s' % _("Probe Points Table")) + self.al_title = FCLabel('%s' % _("Probe Points Table"), bold=True) self.al_title.setToolTip(_("Generate GCode that will obtain the height map")) self.show_al_table = FCCheckBox(_("Show")) @@ -1894,7 +1894,7 @@ class LevelUI: param_grid.addWidget(separator_line, 6, 0, 1, 2) # AUTOLEVELL MODE - al_mode_lbl = FCLabel('%s:' % _("Mode")) + al_mode_lbl = FCLabel('%s' % _("Mode"), bold=True) al_mode_lbl.setToolTip(_("Choose a mode for height map generation.\n" "- Manual: will pick a selection of probe points by clicking on canvas\n" "- Grid: will automatically generate a grid of probe points")) diff --git a/appPlugins/ToolMilling.py b/appPlugins/ToolMilling.py index 39ae0437..23f29e7a 100644 --- a/appPlugins/ToolMilling.py +++ b/appPlugins/ToolMilling.py @@ -4184,7 +4184,7 @@ class MillingUI: separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) new_tool_grid.addWidget(separator_line, 0, 0, 1, 2) - self.tool_sel_label = FCLabel('%s' % _("Add from DB")) + self.tool_sel_label = FCLabel('%s' % _("Add from DB"), bold=True) new_tool_grid.addWidget(self.tool_sel_label, 2, 0, 1, 2) self.addtool_entry_lbl = FCLabel('%s:' % _('Tool Dia')) diff --git a/appPlugins/ToolNCC.py b/appPlugins/ToolNCC.py index 982bba2d..66f44520 100644 --- a/appPlugins/ToolNCC.py +++ b/appPlugins/ToolNCC.py @@ -4193,7 +4193,7 @@ class NccUI: # ############################################################# # ############### Tool selection ############################## # ############################################################# - self.tool_sel_label = FCLabel('%s' % _('Add from DB')) + self.tool_sel_label = FCLabel('%s' % _('Add from DB'), bold=True) new_tool_grid.addWidget(self.tool_sel_label, 2, 0, 1, 3) # ### Tool Diameter #### diff --git a/appPlugins/ToolObjectDistance.py b/appPlugins/ToolObjectDistance.py index 3679a534..88d17eb4 100644 --- a/appPlugins/ToolObjectDistance.py +++ b/appPlugins/ToolObjectDistance.py @@ -570,7 +570,7 @@ class ObjectDistanceUI: res_grid.addWidget(separator_line, 6, 0, 1, 3) # Total Distance - self.total_distance_label = FCLabel("%s:" % _('DISTANCE')) + self.total_distance_label = FCLabel('%s:' % _('DISTANCE'), bold=True) self.total_distance_label.setToolTip(_("This is the point to point Euclidian distance.")) self.total_distance_entry = FCEntry() @@ -584,7 +584,7 @@ class ObjectDistanceUI: res_grid.addWidget(FCLabel("%s" % self.units), 8, 2) # Half Point - self.half_point_label = FCLabel("%s:" % _('Half Point')) + self.half_point_label = FCLabel('%s:' % _('Half Point'), bold=True) self.half_point_label.setToolTip(_("This is the middle point of the point to point Euclidean distance.")) self.half_point_entry = FCEntry() diff --git a/appPlugins/ToolOptimal.py b/appPlugins/ToolOptimal.py index 830dea85..60d29a5d 100644 --- a/appPlugins/ToolOptimal.py +++ b/appPlugins/ToolOptimal.py @@ -494,7 +494,7 @@ class OptimalUI: self.gerber_object_combo.is_last = True self.gerber_object_combo.obj_type = "Gerber" - self.gerber_object_label = FCLabel("%s:" % _("GERBER")) + self.gerber_object_label = FCLabel('%s:' % _("GERBER"), bold=True) self.gerber_object_label.setToolTip( "Gerber object for which to find the minimum distance between copper features." ) diff --git a/appPlugins/ToolPaint.py b/appPlugins/ToolPaint.py index 620e9d2a..03690b15 100644 --- a/appPlugins/ToolPaint.py +++ b/appPlugins/ToolPaint.py @@ -3041,7 +3041,7 @@ class PaintUI: "L = laser")) # Tool Order - self.order_label = FCLabel('%s:' % _('Tool order')) + self.order_label = FCLabel('%s:' % _('Tool order'), bold=True) self.order_label.setToolTip(_("This set the way that the tools in the tools table are used.\n" "'Default' --> means that the used order is the one in the tool table\n" "'Forward' --> means that the tools will be ordered from small to big\n" @@ -3071,7 +3071,7 @@ class PaintUI: separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) new_tool_grid.addWidget(separator_line, 0, 0, 1, 2) - self.tool_sel_label = FCLabel('%s' % _('Add from DB')) + self.tool_sel_label = FCLabel('%s' % _('Add from DB'), bold=True) new_tool_grid.addWidget(self.tool_sel_label, 2, 0, 1, 2) # ### Tool Diameter #### diff --git a/appPlugins/ToolPanelize.py b/appPlugins/ToolPanelize.py index 6bb55144..158de065 100644 --- a/appPlugins/ToolPanelize.py +++ b/appPlugins/ToolPanelize.py @@ -1344,7 +1344,7 @@ class PanelizeUI: # Type of resulting Panel object self.panel_type_radio = RadioSet([{'label': _('Gerber'), 'value': 'gerber'}, {'label': _('Geo'), 'value': 'geometry'}]) - self.panel_type_label = FCLabel("%s:" % _("Panel Type")) + self.panel_type_label = FCLabel('%s:' % _("Panel Type"), bold=True) self.panel_type_label.setToolTip( _("Choose the type of object for the panel object:\n" "- Gerber\n" diff --git a/appPlugins/ToolPcbWizard.py b/appPlugins/ToolPcbWizard.py index d23cd9f1..0c2cab65 100644 --- a/appPlugins/ToolPcbWizard.py +++ b/appPlugins/ToolPcbWizard.py @@ -484,7 +484,7 @@ class WizardUI: # Units type self.units_radio = RadioSet([{'label': _('Inch'), 'value': 'INCH'}, {'label': _('mm'), 'value': 'METRIC'}]) - self.units_label = FCLabel("%s:" % _('Units')) + self.units_label = FCLabel('%s:' % _('Units'), bold=True) self.units_label.setToolTip( _("The type of units that the coordinates and tool\n" "diameters are using. Can be INCH or MM.") diff --git a/appPlugins/ToolPunchGerber.py b/appPlugins/ToolPunchGerber.py index 325bb021..1d04a24f 100644 --- a/appPlugins/ToolPunchGerber.py +++ b/appPlugins/ToolPunchGerber.py @@ -2173,7 +2173,7 @@ class PunchUI: separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken) grid1.addWidget(separator_line, 2, 0, 1, 2) - self.exc_label = FCLabel('%s' % _("Excellon")) + self.exc_label = FCLabel('%s' % _("Excellon"), bold=True) self.exc_label.setToolTip( _("Remove the geometry of Excellon from the Gerber to create the holes in pads.") ) @@ -2188,7 +2188,7 @@ class PunchUI: grid1.addWidget(self.exc_combo, 6, 0, 1, 2) # Fixed Dia - self.fixed_label = FCLabel('%s' % _("Fixed Diameter")) + self.fixed_label = FCLabel('%s' % _("Fixed Diameter"), bold=True) grid1.addWidget(self.fixed_label, 8, 0, 1, 2) # Diameter value @@ -2216,7 +2216,7 @@ class PunchUI: self.ring_frame.setLayout(self.ring_box) # Annular Ring value - self.ring_label = FCLabel('%s' % _("Fixed Annular Ring")) + self.ring_label = FCLabel('%s' % _("Fixed Annular Ring"), bold=True) self.ring_label.setToolTip( _("The size of annular ring.\n" "The copper sliver between the hole exterior\n" @@ -2295,7 +2295,7 @@ class PunchUI: # ############################################################################################################# # Proportional value - self.prop_label = FCLabel('%s' % _("Proportional Diameter")) + self.prop_label = FCLabel('%s' % _("Proportional Diameter"), bold=True) grid1.addWidget(self.prop_label, 14, 0, 1, 2) # Diameter value diff --git a/appPlugins/ToolSolderPaste.py b/appPlugins/ToolSolderPaste.py index d95de190..58586eed 100644 --- a/appPlugins/ToolSolderPaste.py +++ b/appPlugins/ToolSolderPaste.py @@ -1268,7 +1268,7 @@ class SolderUI: _("Tool Diameter. Its value\n" "is the width of the solder paste dispensed.")) - self.addtool_entry_lbl = FCLabel('%s:' % _('New Tool')) + self.addtool_entry_lbl = FCLabel('%s:' % _('New Tool'), bold=True) self.addtool_entry_lbl.setToolTip( _("Diameter for the new tool to add in the Tool Table") ) diff --git a/appPlugins/ToolSub.py b/appPlugins/ToolSub.py index a6b42da3..f16de017 100644 --- a/appPlugins/ToolSub.py +++ b/appPlugins/ToolSub.py @@ -901,7 +901,7 @@ class SubUI: geo_grid = GLay(v_spacing=5, h_spacing=3) geo_frame.setLayout(geo_grid) - self.geo_title = FCLabel("%s" % _("GEOMETRY")) + self.geo_title = FCLabel('%s' % _("GEOMETRY"), bold=True) self.tools_box.addWidget(self.geo_title) # Target Geometry Object