Application wide updates for dark mode support including dark canvas option and better colors

This commit is contained in:
Ali Khalil
2022-04-17 22:41:02 +03:00
parent adad500f15
commit 5cc869c1fd
93 changed files with 690 additions and 567 deletions

View File

@@ -25,7 +25,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
self.param_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _('Parameters'))
self.param_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _('Parameters')))
self.param_label.setToolTip(
_("A tool to generate a Copper Thieving that can be added\n"
"to a selected Gerber file.")
@@ -259,7 +259,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Robber Bar Parameters Frame
# #############################################################################################################
self.robber_bar_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _('Robber Bar Parameters'))
self.robber_bar_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('brown'), _('Robber Bar Parameters')))
self.robber_bar_label.setToolTip(
_("Parameters used for the robber bar.\n"
"Robber bar = copper border to help in pattern hole plating.")
@@ -302,7 +302,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# RPattern Plating Mask Parameters Frame
# #############################################################################################################
self.patern_mask_label = FCLabel('<span style="color:purple;"><b>%s</b></span>' % _('Pattern Plating Mask'))
self.patern_mask_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('purple'), _('Pattern Plating Mask')))
self.patern_mask_label.setToolTip(
_("Generate a mask for pattern plating.")
)

View File

@@ -25,7 +25,7 @@ class Tools2CalPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
self.param_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _('Parameters'))
self.param_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _('Parameters')))
self.param_label.setToolTip(
_("Parameters used for this tool.")
)
@@ -110,7 +110,7 @@ class Tools2CalPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Tool change Frame
# #############################################################################################################
tc_lbl = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _("Tool change"))
tc_lbl = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('brown'), _("Tool change")))
self.layout.addWidget(tc_lbl)
tc_frame = FCFrame()

View File

@@ -24,7 +24,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.padt_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Processed Pads Type"))
self.padt_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Processed Pads Type")))
self.padt_label.setToolTip(
_("The type of pads shape to be processed.\n"
"If the PCB has many SMD pads with rectangular pads,\n"
@@ -101,7 +101,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
],
orientation='vertical',
compact=True)
self.method_label = FCLabel('<span style="color:green;"><b>%s:</b></span>' % _("Method"))
self.method_label = FCLabel('<span style="color:%s;"><b>%s:</b></span>' % (self.app.theme_safe_color('green'), _("Method")))
self.method_label.setToolTip(
_("The method for processing pads. Can be:\n"
"- Fixed Diameter -> all holes will have a set size\n"
@@ -119,7 +119,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Fixed Diameter Frame
# #############################################################################################################
self.fixed_label = FCLabel('<span style="color:teal;"><b>%s</b></span>' % _("Fixed Diameter"))
self.fixed_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('teal'), _("Fixed Diameter")))
self.layout.addWidget(self.fixed_label)
fix_frame = FCFrame()
@@ -144,7 +144,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Annular ring Frame
# #############################################################################################################
self.ring_label = FCLabel('<span style="color:darkorange;"><b>%s</b></span>' % _("Fixed Annular Ring"))
self.ring_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('darkorange'), _("Fixed Annular Ring")))
self.ring_label.setToolTip(
_("The size of annular ring.\n"
"The copper sliver between the hole exterior\n"
@@ -226,7 +226,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Proportional Diameter Frame
# #############################################################################################################
self.prop_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("Proportional Diameter"))
self.prop_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('indigo'), _("Proportional Diameter")))
self.layout.addWidget(self.prop_label)
prop_frame = FCFrame()
@@ -253,7 +253,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Extract Soldermask Frame
# #############################################################################################################
self.extract_sm_label = FCLabel('<span style="color:magenta;"><b>%s</b></span>' % _("Extract Soldermask"))
self.extract_sm_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('magenta'), _("Extract Soldermask")))
self.extract_sm_label.setToolTip(
_("Extract soldermask from a given Gerber file."))
self.layout.addWidget(self.extract_sm_label)
@@ -281,7 +281,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Extract CutOut Frame
# #############################################################################################################
self.extract_cut_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _("Extract Cutout"))
self.extract_cut_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('brown'), _("Extract Cutout")))
self.extract_cut_label.setToolTip(
_("Extract a cutout from a given Gerber file."))
self.layout.addWidget(self.extract_cut_label)

View File

@@ -24,7 +24,7 @@ class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
self.param_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _('Parameters'))
self.param_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _('Parameters')))
self.param_label.setToolTip(
_("Parameters used for this tool.")
)
@@ -117,7 +117,7 @@ class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Selection Frame
# #############################################################################################################
self.sel_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _("Selection"))
self.sel_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('brown'), _("Selection")))
self.layout.addWidget(self.sel_label)
s_frame = FCFrame()

View File

@@ -24,7 +24,7 @@ class Tools2InvertPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.sublabel = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.sublabel = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.sublabel.setToolTip(
_("A tool to invert Gerber geometry from positive to negative\n"
"and in revers.")
@@ -54,7 +54,7 @@ class Tools2InvertPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Line Join Frame
# #############################################################################################################
self.join_label = FCLabel('<span style="color:tomato;"><b>%s</b></span>' % _("Lines Join Style"))
self.join_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('tomato'), _("Lines Join Style")))
self.join_label.setToolTip(
_("The way that the lines in the object outline will be joined.\n"
"Can be:\n"

View File

@@ -24,7 +24,7 @@ class Tools2OptimalPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
self.optlabel = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.optlabel = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.optlabel.setToolTip(
_("A tool to find the minimum distance between\n"
"every two Gerber geometric elements")

View File

@@ -24,7 +24,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Processed Pads Frame
# #############################################################################################################
self.padt_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Processed Pads Type"))
self.padt_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Processed Pads Type")))
self.padt_label.setToolTip(
_("The type of pads shape to be processed.\n"
"If the PCB has many SMD pads with rectangular pads,\n"
@@ -102,7 +102,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
],
orientation='vertical',
compact=True)
self.hole_size_label = FCLabel('<span style="color:green;"><b>%s:</b></span>' % _("Method"))
self.hole_size_label = FCLabel('<span style="color:%s;"><b>%s:</b></span>' % (self.app.theme_safe_color('green'), _("Method")))
self.hole_size_label.setToolTip(
_("The punch hole source can be:\n"
"- Excellon Object-> the Excellon object drills center will serve as reference.\n"
@@ -116,7 +116,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Fixed Diameter Frame
# #############################################################################################################
self.fixed_label = FCLabel('<span style="color:teal;"><b>%s</b></span>' % _("Fixed Diameter"))
self.fixed_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('teal'), _("Fixed Diameter")))
self.layout.addWidget(self.fixed_label)
fix_frame = FCFrame()
@@ -141,7 +141,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Annular ring Frame
# #############################################################################################################
self.ring_label = FCLabel('<span style="color:darkorange;"><b>%s</b></span>' % _("Fixed Annular Ring"))
self.ring_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('darkorange'), _("Fixed Annular Ring")))
self.ring_label.setToolTip(
_("The size of annular ring.\n"
"The copper sliver between the hole exterior\n"
@@ -223,7 +223,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Proportional Diameter Frame
# #############################################################################################################
self.prop_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("Proportional Diameter"))
self.prop_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('indigo'), _("Proportional Diameter")))
self.layout.addWidget(self.prop_label)
prop_frame = FCFrame()

View File

@@ -24,7 +24,7 @@ class Tools2QRCodePrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
self.qrlabel = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.qrlabel = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.qrlabel.setToolTip(
_("A tool to create a QRCode that can be inserted\n"
"into a selected Gerber file, or it can be exported as a file.")

View File

@@ -28,7 +28,7 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Rules Frame
# #############################################################################################################
rules_copper_label = FCLabel('<span style="color:darkorange;"><b>%s %s</b></span>' % (_("Copper"), _("Rules")))
rules_copper_label = FCLabel('<span style="color:%s;"><b>%s %s</b></span>' % (self.app.theme_safe_color('darkorange'), _("Copper"), _("Rules")))
self.layout.addWidget(rules_copper_label)
copper_frame = FCFrame()
@@ -127,7 +127,7 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Silk Frame
# #############################################################################################################
silk_copper_label = FCLabel('<span style="color:teal;"><b>%s %s</b></span>' % (_("Silk"), _("Rules")))
silk_copper_label = FCLabel('<span style="color:%s;"><b>%s %s</b></span>' % (self.app.theme_safe_color('teal'), _("Silk"), _("Rules")))
self.layout.addWidget(silk_copper_label)
silk_frame = FCFrame()
@@ -205,7 +205,7 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Soldermask Frame
# #############################################################################################################
sm_copper_label = FCLabel('<span style="color:magenta;"><b>%s %s</b></span>' % (_("Soldermask"), _("Rules")))
sm_copper_label = FCLabel('<span style="color:%s;"><b>%s %s</b></span>' % (self.app.theme_safe_color('magenta'), _("Soldermask"), _("Rules")))
self.layout.addWidget(sm_copper_label)
solder_frame = FCFrame()
@@ -240,7 +240,7 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Holes Frame
# #############################################################################################################
holes_copper_label = FCLabel('<span style="color:brown;"><b>%s %s</b></span>' % (_("Holes"), _("Rules")))
holes_copper_label = FCLabel('<span style="color:%s;"><b>%s %s</b></span>' % (self.app.theme_safe_color('brown'), _("Holes"), _("Rules")))
self.layout.addWidget(holes_copper_label)
holes_frame = FCFrame()

View File

@@ -22,7 +22,7 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
self.options = app.options
# ## Board cuttout
self.dblsided_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("PCB Alignment"))
self.dblsided_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('indigo'), _("PCB Alignment")))
self.dblsided_label.setToolTip(
_("A tool to help in creating a double sided\n"
"PCB using alignment holes.")
@@ -89,7 +89,7 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
# Mirror Frame
# #############################################################################################################
# ### Tools ## ##
self.mirror_label = FCLabel('<span style="color:red;"><b>%s</b></span>' % _("Mirror Operation"))
self.mirror_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('red'), _("Mirror Operation")))
self.layout.addWidget(self.mirror_label)
mirror_frame = FCFrame()

View File

@@ -24,7 +24,7 @@ class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# V-Shape Tool Frame
# #############################################################################################################
self.vshape_tool_label = FCLabel('<span style="color:green;"><b>%s</b></span>' % _("V-Shape Tool Calculator"))
self.vshape_tool_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('green'), _("V-Shape Tool Calculator")))
self.vshape_tool_label.setToolTip(
_("Calculate the tool diameter for a given V-shape tool,\n"
"having the tip diameter, tip angle and\n"
@@ -83,7 +83,7 @@ class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Electroplating Frame
# #############################################################################################################
self.plate_title_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _("ElectroPlating Calculator"))
self.plate_title_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('brown'), _("ElectroPlating Calculator")))
self.plate_title_label.setToolTip(
_("This calculator is useful for those who plate the via/pad/drill holes,\n"
"using a method like graphite ink or calcium hypophosphite ink or palladium chloride.")

View File

@@ -23,7 +23,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
self.options = app.options
# ## Board cutout
self.board_cutout_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.board_cutout_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.board_cutout_label.setToolTip(
_("Create toolpaths to cut around\n"
"the PCB and separate it from\n"
@@ -134,7 +134,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
param_grid.addWidget(marginlabel, 10, 0)
param_grid.addWidget(self.cutout_margin_entry, 10, 1)
self.gaps_label = FCLabel('<span style="color:green;"><b>%s</b></span>' % _("Gaps"))
self.gaps_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('green'), _("Gaps")))
self.layout.addWidget(self.gaps_label)
# #############################################################################################################
# Gaps Frame
@@ -260,7 +260,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
gaps_grid.addWidget(self.big_cursor_cb, 18, 0, 1, 2)
# Cut by Drilling Title
self.title_drillcut_label = FCLabel('<span style="color:red;"><b>%s</b></span>' % _('Cut by Drilling'))
self.title_drillcut_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('red'), _('Cut by Drilling')))
self.title_drillcut_label.setToolTip(_("Create a series of drill holes following a geometry line."))
self.layout.addWidget(self.title_drillcut_label)

View File

@@ -25,7 +25,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.drill_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.drill_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.drill_label.setToolTip(
_("Create CNCJob with toolpaths for drilling or milling holes.")
)
@@ -226,7 +226,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Drill Slots Frame
# #############################################################################################################
self.dslots_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _('Drilling Slots'))
self.dslots_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('brown'), _('Drilling Slots')))
self.layout.addWidget(self.dslots_label)
ds_frame = FCFrame()
@@ -272,7 +272,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Advanced Options Frame
# #############################################################################################################
self.exc_label = FCLabel('<span style="color:teal;"><b>%s</b></span>' % _('Advanced Options'))
self.exc_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('teal'), _('Advanced Options')))
self.exc_label.setToolTip(
_("A list of advanced parameters.")
)
@@ -417,7 +417,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Area Exclusion Frame
# #############################################################################################################
self.area_exc_label = FCLabel('<span style="color:magenta;"><b>%s</b></span>' % _('Area Exclusion'))
self.area_exc_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('magenta'), _('Area Exclusion')))
self.area_exc_label.setToolTip(
_("Area exclusion parameters.")
)

View File

@@ -25,7 +25,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Adjustments Frame
# #############################################################################################################
self.film_adj_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _("Adjustments"))
self.film_adj_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('brown'), _("Adjustments")))
self.film_adj_label.setToolTip(
_("Compensate print distortions.")
)
@@ -44,11 +44,6 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
_("A value greater than 1 will compact the film\n"
"while a value less than 1 will jolt it.")
)
self.film_scale_cb.setStyleSheet(
"""
QCheckBox {font-weight: bold; color: black}
"""
)
adj_grid.addWidget(self.film_scale_cb, 2, 0, 1, 2)
# SCALE FRAME
@@ -109,11 +104,6 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
_("Positive values will skew to the right\n"
"while negative values will skew to the left.")
)
self.film_skew_cb.setStyleSheet(
"""
QCheckBox {font-weight: bold; color: black}
"""
)
adj_grid.addWidget(self.film_skew_cb, 8, 0, 1, 2)
# SKEW FRAME
@@ -171,11 +161,6 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
self.film_mirror_cb.setToolTip(
_("Mirror the film geometry on the selected axis or on both.")
)
self.film_mirror_cb.setStyleSheet(
"""
QCheckBox {font-weight: bold; color: black}
"""
)
adj_grid.addWidget(self.film_mirror_cb, 12, 0, 1, 2)
self.film_mirror_axis = RadioSet([{'label': _('X'), 'value': 'x'},
@@ -195,7 +180,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
self.film_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.film_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.film_label.setToolTip(
_("Create a PCB film from a Gerber or Geometry object.\n"
"The file is saved in SVG format.")

View File

@@ -22,7 +22,7 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
self.options = app.options
# ## Clear non-copper regions
self.iso_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.iso_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.iso_label.setToolTip(
_("Create a Geometry object with\n"
"toolpaths to cut around polygons.")
@@ -135,7 +135,7 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
# Tool Frame
# #############################################################################################################
# ### Tools ## ##
self.tools_table_label = FCLabel('<span style="color:green;"><b>%s</b></span>' % _("Tool Parameters"))
self.tools_table_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('green'), _("Tool Parameters")))
self.layout.addWidget(self.tools_table_label)
tt_frame = FCFrame()
@@ -245,7 +245,7 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# General Parameters Frame
# #############################################################################################################
self.gen_param_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("Common Parameters"))
self.gen_param_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('indigo'), _("Common Parameters")))
self.gen_param_label.setToolTip(
_("Parameters that are common for all tools.")
)

View File

@@ -22,7 +22,7 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.options = app.options
# ## Board cuttout
self.levelling_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.levelling_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.levelling_label.setToolTip(
_("Generate CNC Code with auto-levelled paths.")
)

View File

@@ -24,7 +24,7 @@ class ToolsMarkersPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.param_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _('Parameters'))
self.param_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _('Parameters')))
self.param_label.setToolTip(
_("Parameters used for this tool.")
)
@@ -104,7 +104,7 @@ class ToolsMarkersPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Offset Frame
# #############################################################################################################
self.offset_title_label = FCLabel('<span style="color:magenta;"><b>%s</b></span>' % _('Offset'))
self.offset_title_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('magenta'), _('Offset')))
self.offset_title_label.setToolTip(_("Offset locations from the set reference."))
self.layout.addWidget(self.offset_title_label)

View File

@@ -25,7 +25,7 @@ class ToolsMillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.mill_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.mill_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.mill_label.setToolTip(
_("Create CNCJob with toolpaths for milling either Geometry or drill holes.")
)
@@ -289,7 +289,7 @@ class ToolsMillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Advanced Options Frame
# #############################################################################################################
self.adv_label = FCLabel('<span style="color:teal;"><b>%s</b></span>' % _('Advanced Options'))
self.adv_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('teal'), _('Advanced Options')))
self.adv_label.setToolTip(
_("A list of advanced parameters.")
)
@@ -437,7 +437,7 @@ class ToolsMillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Area Exclusion Frame
# #############################################################################################################
self.area_exc_label = FCLabel('<span style="color:magenta;"><b>%s</b></span>' % _('Area Exclusion'))
self.area_exc_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('magenta'), _('Area Exclusion')))
self.area_exc_label.setToolTip(
_("Area exclusion parameters.")
)
@@ -503,7 +503,7 @@ class ToolsMillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Area Polish Frame
# #############################################################################################################
self.pol_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _('Add Polish'))
self.pol_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('brown'), _('Add Polish')))
self.pol_label.setToolTip(
_("Will add a Paint section at the end of the GCode.\n"
"A metallic brush will clean the material after milling.")
@@ -562,7 +562,7 @@ class ToolsMillPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Excellon Milling Frame
# #############################################################################################################
self.mille_label = FCLabel('<span style="color:darkorange;"><b>%s</b></span>' % _('Excellon Milling'))
self.mille_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('darkorange'), _('Excellon Milling')))
self.mille_label.setToolTip(
_("Will mill Excellon holes progressively from the center of the hole.")
)

View File

@@ -23,7 +23,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
self.options = app.options
# ## Clear non-copper regions
self.clearcopper_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.clearcopper_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.clearcopper_label.setToolTip(
_("Create a Geometry object with\n"
"toolpaths to cut all non-copper regions.")
@@ -155,7 +155,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
# Tool Frame
# #############################################################################################################
# ### Tools ## ##
self.tools_table_label = FCLabel('<span style="color:green;"><b>%s</b></span>' % _("Tool Parameters"))
self.tools_table_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('green'), _("Tool Parameters")))
self.layout.addWidget(self.tools_table_label)
tt_frame = FCFrame()
@@ -271,7 +271,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# General Parameters Frame
# #############################################################################################################
self.gen_param_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("Common Parameters"))
self.gen_param_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('indigo'), _("Common Parameters")))
self.gen_param_label.setToolTip(
_("Parameters that are common for all tools.")
)

View File

@@ -25,7 +25,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
# ------------------------------
# ## Paint area
# ------------------------------
self.paint_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _('Parameters'))
self.paint_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _('Parameters')))
self.paint_label.setToolTip(
_("Creates tool paths to cover the\n"
"whole area of a polygon.")
@@ -138,7 +138,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
# Tool Frame
# #############################################################################################################
# ### Tools ## ##
self.tools_table_label = FCLabel('<span style="color:green;"><b>%s</b></span>' % _("Tool Parameters"))
self.tools_table_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('green'), _("Tool Parameters")))
self.layout.addWidget(self.tools_table_label)
tt_frame = FCFrame()
@@ -228,7 +228,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# General Parameters Frame
# #############################################################################################################
self.gen_param_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("Common Parameters"))
self.gen_param_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('indigo'), _("Common Parameters")))
self.gen_param_label.setToolTip(
_("Parameters that are common for all tools.")
)

View File

@@ -24,7 +24,7 @@ class ToolsPanelizePrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.panelize_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.panelize_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.panelize_label.setToolTip(
_("Create an object that contains an array of (x, y) elements,\n"
"each element is a copy of the source object spaced\n"

View File

@@ -25,7 +25,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.solderpastelabel = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.solderpastelabel = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.solderpastelabel.setToolTip(
_("A tool to create GCode for dispensing\n"
"solder paste onto a PCB.")

View File

@@ -21,7 +21,7 @@ class ToolsSubPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.sublabel = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.sublabel = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.sublabel.setToolTip(
_("A tool to substract one Gerber or Geometry object\n"
"from another of the same type.")

View File

@@ -25,7 +25,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.transform_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.transform_label = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('blue'), _("Parameters")))
self.transform_label.setToolTip(
_("Various transformations that can be applied\n"
"on a application object.")
@@ -85,7 +85,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Rotate Frame
# #############################################################################################################
rotate_title_lbl = FCLabel('<span style="color:tomato;"><b>%s</b></span>' % _("Rotate"))
rotate_title_lbl = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('tomato'), _("Rotate")))
self.layout.addWidget(rotate_title_lbl)
rot_frame = FCFrame()
@@ -115,7 +115,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
s_t_lay = QtWidgets.QHBoxLayout()
self.layout.addLayout(s_t_lay)
skew_title_lbl = FCLabel('<span style="color:teal;"><b>%s</b></span>' % _("Skew"))
skew_title_lbl = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('teal'), _("Skew")))
s_t_lay.addWidget(skew_title_lbl)
s_t_lay.addStretch()
@@ -168,7 +168,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
sc_t_lay = QtWidgets.QHBoxLayout()
self.layout.addLayout(sc_t_lay)
scale_title_lbl = FCLabel('<span style="color:magenta;"><b>%s</b></span>' % _("Scale"))
scale_title_lbl = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('magenta'), _("Scale")))
sc_t_lay.addWidget(scale_title_lbl)
sc_t_lay.addStretch()
@@ -214,7 +214,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
# #############################################################################################################
# Offset Frame
# #############################################################################################################
offset_title_lbl = FCLabel('<span style="color:green;"><b>%s</b></span>' % _("Offset"))
offset_title_lbl = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('green'), _("Offset")))
self.layout.addWidget(offset_title_lbl)
off_frame = FCFrame()
@@ -254,7 +254,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
b_t_lay = QtWidgets.QHBoxLayout()
self.layout.addLayout(b_t_lay)
buffer_title_lbl = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("Buffer"))
buffer_title_lbl = FCLabel('<span style="color:%s;"><b>%s</b></span>' % (self.app.theme_safe_color('indigo'), _("Buffer")))
b_t_lay.addWidget(buffer_title_lbl)
b_t_lay.addStretch()