diff --git a/CHANGELOG.md b/CHANGELOG.md
index 68f53889..8cbf27a9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ CHANGELOG for FlatCAM beta
- in Alignment Plugin updated the GUI
- remade the Gerber Object Properties UI
- fixed a small typo when creating a new Gerber empty App Object
+- in Copper Thieving Plugin updated the GUI
4.09.2021
diff --git a/appGUI/GUIElements.py b/appGUI/GUIElements.py
index 08f66a6c..4eb825fa 100644
--- a/appGUI/GUIElements.py
+++ b/appGUI/GUIElements.py
@@ -2267,10 +2267,14 @@ class FCPlainTextAreaExtended(QtWidgets.QPlainTextEdit):
class FCFrame(QtWidgets.QFrame):
- # used when I want to apply stylesheets but not to children's of the same type
+ # a styled QFrame
def __init__(self, **kwargs):
super().__init__(**kwargs)
+ self.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
+ # self.setContentsMargins(0, 0, 0, 0)
+ self.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
+
class FCComboBox(QtWidgets.QComboBox):
diff --git a/appGUI/ObjectUI.py b/appGUI/ObjectUI.py
index cdb9da0a..83d9b360 100644
--- a/appGUI/ObjectUI.py
+++ b/appGUI/ObjectUI.py
@@ -97,8 +97,6 @@ class ObjectUI(QtWidgets.QWidget):
layout.addWidget(self.transform_label)
trans_frame = FCFrame()
- trans_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- trans_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
layout.addWidget(trans_frame)
self.common_grid = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -192,8 +190,6 @@ class GerberObjectUI(ObjectUI):
# General Frame
# #############################################################################################################
gen_frame = FCFrame()
- gen_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- gen_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.custom_box.addWidget(gen_frame)
# Plot options
@@ -295,9 +291,6 @@ class GerberObjectUI(ObjectUI):
self.custom_box.addWidget(self.tools_table_label)
self.tt_frame = FCFrame()
- self.tt_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # self.tt_frame.setContentsMargins(0, 0, 0, 0)
- self.tt_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.custom_box.addWidget(self.tt_frame)
# Grid Layout
@@ -497,8 +490,6 @@ class GerberObjectUI(ObjectUI):
self.util_box.addWidget(self.noncopper_label)
ncc_frame = FCFrame()
- ncc_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- ncc_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.util_box.addWidget(ncc_frame)
grid_ncc = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -547,9 +538,6 @@ class GerberObjectUI(ObjectUI):
self.util_box.addWidget(self.boundingbox_label)
bb_frame = FCFrame()
- bb_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- bb_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.util_box.addWidget(bb_frame)
# Grid Layout
diff --git a/appPlugins/ToolAlignObjects.py b/appPlugins/ToolAlignObjects.py
index ad6eda46..d6765c32 100644
--- a/appPlugins/ToolAlignObjects.py
+++ b/appPlugins/ToolAlignObjects.py
@@ -434,9 +434,6 @@ class AlignUI:
self.tools_box.addWidget(self.aligned_label)
m_frame = FCFrame()
- m_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- m_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(m_frame)
# Grid Layout
@@ -478,9 +475,6 @@ class AlignUI:
self.tools_box.addWidget(self.aligned_label)
d_frame = FCFrame()
- d_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- d_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(d_frame)
# Grid Layout
@@ -516,9 +510,6 @@ class AlignUI:
self.tools_box.addWidget(self.param_label)
par_frame = FCFrame()
- par_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # par_frame.setContentsMargins(0, 0, 0, 0)
- par_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(par_frame)
# Grid Layout
diff --git a/appPlugins/ToolCalculators.py b/appPlugins/ToolCalculators.py
index 26f17120..d2c2d192 100644
--- a/appPlugins/ToolCalculators.py
+++ b/appPlugins/ToolCalculators.py
@@ -501,9 +501,6 @@ class CalcUI:
self.layout.addWidget(units_label)
units_frame = FCFrame()
- units_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- units_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.layout.addWidget(units_frame)
# Grid Layout
@@ -537,9 +534,6 @@ class CalcUI:
self.layout.addWidget(v_shape_title_label)
v_frame = FCFrame()
- v_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- v_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.layout.addWidget(v_frame)
grid_vshape = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -623,9 +617,6 @@ class CalcUI:
self.layout.addWidget(tin_title_label)
ep_frame = FCFrame()
- ep_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- ep_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.layout.addWidget(ep_frame)
grid_electro = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -811,9 +802,6 @@ class CalcUI:
self.layout.addWidget(tin_title_label)
tin_frame = FCFrame()
- tin_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- tin_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.layout.addWidget(tin_frame)
grid_tin = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -945,7 +933,10 @@ class CalcUI:
# Sodium hypophosphite
self.hypo_label = FCLabel("NaPO2H2 :")
- self.hypo_label.setToolTip(_('Sodium hypophosphite. Optional, for solution stability.'))
+ self.hypo_label.setToolTip(
+ _('Sodium hypophosphite.\n'
+ 'Optional, for solution stability.\n'
+ 'Warning: List 1 chemical in USA.'))
self.hypo_entry = FCDoubleSpinner(callback=self.confirmation_message)
self.hypo_entry.setSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding,
QtWidgets.QSizePolicy.Policy.Preferred)
diff --git a/appPlugins/ToolCopperThieving.py b/appPlugins/ToolCopperThieving.py
index d3e26467..19278b5a 100644
--- a/appPlugins/ToolCopperThieving.py
+++ b/appPlugins/ToolCopperThieving.py
@@ -10,7 +10,7 @@ from PyQt6 import QtWidgets, QtCore, QtGui
from camlib import grace
from appTool import AppTool
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCEntry, FCComboBox, FCLabel, FCCheckBox, \
- VerticalScrollArea, FCGridLayout
+ VerticalScrollArea, FCGridLayout, FCFrame
from appCommon.Common import LoudDict
import shapely.geometry.base as base
@@ -1288,11 +1288,25 @@ class ThievingUI:
""")
self.layout.addWidget(title_label)
+ self.tools_frame = QtWidgets.QFrame()
+ self.tools_frame.setContentsMargins(0, 0, 0, 0)
+ self.layout.addWidget(self.tools_frame)
+ self.tools_box = QtWidgets.QVBoxLayout()
+ self.tools_box.setContentsMargins(0, 0, 0, 0)
+ self.tools_frame.setLayout(self.tools_box)
+
+ # #############################################################################################################
+ # Source Object Frame
+ # #############################################################################################################
+ self.grbobj_label = FCLabel('%s' % _("Source Object"))
+ self.grbobj_label.setToolTip(_("Gerber Object to which will be added a copper thieving."))
+ self.tools_box.addWidget(self.grbobj_label)
+
# ## Grid Layout
i_grid_lay = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(i_grid_lay)
i_grid_lay.setColumnStretch(0, 0)
i_grid_lay.setColumnStretch(1, 1)
+ self.tools_box.addLayout(i_grid_lay)
self.grb_object_combo = FCComboBox()
self.grb_object_combo.setModel(self.app.collection)
@@ -1300,31 +1314,24 @@ class ThievingUI:
self.grb_object_combo.is_last = True
self.grb_object_combo.obj_type = 'Gerber'
- self.grbobj_label = FCLabel("%s:" % _("GERBER"))
- self.grbobj_label.setToolTip(
- _("Gerber Object to which will be added a copper thieving.")
- )
+ i_grid_lay.addWidget(self.grb_object_combo, 0, 0, 1, 2)
- i_grid_lay.addWidget(self.grbobj_label, 0, 0)
- i_grid_lay.addWidget(self.grb_object_combo, 1, 0, 1, 2)
+ # #############################################################################################################
+ # Thieving Parameters Frame
+ # #############################################################################################################
+ self.copper_fill_label = FCLabel('%s %s' %
+ (_('Thieving'), _("Parameters")))
+ self.copper_fill_label.setToolTip(_("Parameters used for this tool."))
+ self.tools_box.addWidget(self.copper_fill_label)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- i_grid_lay.addWidget(separator_line, 2, 0, 1, 2)
+ tp_frame = FCFrame()
+ self.tools_box.addWidget(tp_frame)
# ## Grid Layout
grid_lay = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid_lay)
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)
-
- self.copper_fill_label = FCLabel('%s' %
- _('Thieving Parameters').upper())
- self.copper_fill_label.setToolTip(
- _("Parameters used for this tool.")
- )
- grid_lay.addWidget(self.copper_fill_label, 0, 0, 1, 2)
+ tp_frame.setLayout(grid_lay)
# CLEARANCE #
self.clearance_label = FCLabel('%s:' % _("Clearance"))
@@ -1461,10 +1468,13 @@ class ThievingUI:
grid_lay.addWidget(self.fill_type_label, 18, 0)
grid_lay.addWidget(self.fill_type_radio, 18, 1)
+ # #############################################################################################################
# DOTS FRAME
+ # #############################################################################################################
self.dots_frame = QtWidgets.QFrame()
self.dots_frame.setContentsMargins(0, 0, 0, 0)
- self.layout.addWidget(self.dots_frame)
+ grid_lay.addWidget(self.dots_frame, 20, 0, 1, 2)
+
dots_grid = FCGridLayout(v_spacing=5, h_spacing=3)
dots_grid.setColumnStretch(0, 0)
dots_grid.setColumnStretch(1, 1)
@@ -1472,8 +1482,13 @@ class ThievingUI:
self.dots_frame.setLayout(dots_grid)
self.dots_frame.hide()
+ separator_line = QtWidgets.QFrame()
+ separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
+ separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
+ dots_grid.addWidget(separator_line, 0, 0, 1, 2)
+
self.dots_label = FCLabel('%s:' % _("Dots Grid Parameters"))
- dots_grid.addWidget(self.dots_label, 0, 0, 1, 2)
+ dots_grid.addWidget(self.dots_label, 2, 0, 1, 2)
# Dot diameter #
self.dotdia_label = FCLabel('%s:' % _("Dia"))
@@ -1485,8 +1500,8 @@ class ThievingUI:
self.dot_dia_entry.set_precision(self.decimals)
self.dot_dia_entry.setSingleStep(0.1)
- dots_grid.addWidget(self.dotdia_label, 1, 0)
- dots_grid.addWidget(self.dot_dia_entry, 1, 1)
+ dots_grid.addWidget(self.dotdia_label, 4, 0)
+ dots_grid.addWidget(self.dot_dia_entry, 4, 1)
# Dot spacing #
self.dotspacing_label = FCLabel('%s:' % _("Spacing"))
@@ -1498,13 +1513,16 @@ class ThievingUI:
self.dot_spacing_entry.set_precision(self.decimals)
self.dot_spacing_entry.setSingleStep(0.1)
- dots_grid.addWidget(self.dotspacing_label, 2, 0)
- dots_grid.addWidget(self.dot_spacing_entry, 2, 1)
+ dots_grid.addWidget(self.dotspacing_label, 6, 0)
+ dots_grid.addWidget(self.dot_spacing_entry, 6, 1)
+ # #############################################################################################################
# SQUARES FRAME
+ # #############################################################################################################
self.squares_frame = QtWidgets.QFrame()
self.squares_frame.setContentsMargins(0, 0, 0, 0)
- self.layout.addWidget(self.squares_frame)
+ grid_lay.addWidget(self.squares_frame, 22, 0, 1, 2)
+
squares_grid = FCGridLayout(v_spacing=5, h_spacing=3)
squares_grid.setColumnStretch(0, 0)
squares_grid.setColumnStretch(1, 1)
@@ -1512,8 +1530,13 @@ class ThievingUI:
self.squares_frame.setLayout(squares_grid)
self.squares_frame.hide()
+ separator_line = QtWidgets.QFrame()
+ separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
+ separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
+ squares_grid.addWidget(separator_line, 0, 0, 1, 2)
+
self.squares_label = FCLabel('%s:' % _("Squares Grid Parameters"))
- squares_grid.addWidget(self.squares_label, 0, 0, 1, 2)
+ squares_grid.addWidget(self.squares_label, 2, 0, 1, 2)
# Square Size #
self.square_size_label = FCLabel('%s:' % _("Size"))
@@ -1525,8 +1548,8 @@ class ThievingUI:
self.square_size_entry.set_precision(self.decimals)
self.square_size_entry.setSingleStep(0.1)
- squares_grid.addWidget(self.square_size_label, 1, 0)
- squares_grid.addWidget(self.square_size_entry, 1, 1)
+ squares_grid.addWidget(self.square_size_label, 4, 0)
+ squares_grid.addWidget(self.square_size_entry, 4, 1)
# Squares spacing #
self.squares_spacing_label = FCLabel('%s:' % _("Spacing"))
@@ -1538,13 +1561,16 @@ class ThievingUI:
self.squares_spacing_entry.set_precision(self.decimals)
self.squares_spacing_entry.setSingleStep(0.1)
- squares_grid.addWidget(self.squares_spacing_label, 2, 0)
- squares_grid.addWidget(self.squares_spacing_entry, 2, 1)
+ squares_grid.addWidget(self.squares_spacing_label, 6, 0)
+ squares_grid.addWidget(self.squares_spacing_entry, 6, 1)
+ # #############################################################################################################
# LINES FRAME
+ # #############################################################################################################
self.lines_frame = QtWidgets.QFrame()
self.lines_frame.setContentsMargins(0, 0, 0, 0)
- self.layout.addWidget(self.lines_frame)
+ grid_lay.addWidget(self.lines_frame, 24, 0, 1, 2)
+
lines_grid = FCGridLayout(v_spacing=5, h_spacing=3)
lines_grid.setColumnStretch(0, 0)
lines_grid.setColumnStretch(1, 1)
@@ -1552,10 +1578,15 @@ class ThievingUI:
self.lines_frame.setLayout(lines_grid)
self.lines_frame.hide()
- self.lines_label = FCLabel('%s:' % _("Lines Grid Parameters"))
- lines_grid.addWidget(self.lines_label, 0, 0, 1, 2)
+ separator_line = QtWidgets.QFrame()
+ separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
+ separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
+ lines_grid.addWidget(separator_line, 0, 0, 1, 2)
- # Square Size #
+ self.lines_label = FCLabel('%s:' % _("Lines Grid Parameters"))
+ lines_grid.addWidget(self.lines_label, 2, 0, 1, 2)
+
+ # Line Size #
self.line_size_label = FCLabel('%s:' % _("Size"))
self.line_size_label.setToolTip(
_("Line thickness size in Lines Grid.")
@@ -1565,8 +1596,8 @@ class ThievingUI:
self.line_size_entry.set_precision(self.decimals)
self.line_size_entry.setSingleStep(0.1)
- lines_grid.addWidget(self.line_size_label, 1, 0)
- lines_grid.addWidget(self.line_size_entry, 1, 1)
+ lines_grid.addWidget(self.line_size_label, 4, 0)
+ lines_grid.addWidget(self.line_size_entry, 4, 1)
# Lines spacing #
self.lines_spacing_label = FCLabel('%s:' % _("Spacing"))
@@ -1578,10 +1609,12 @@ class ThievingUI:
self.lines_spacing_entry.set_precision(self.decimals)
self.lines_spacing_entry.setSingleStep(0.1)
- lines_grid.addWidget(self.lines_spacing_label, 2, 0)
- lines_grid.addWidget(self.lines_spacing_entry, 2, 1)
+ lines_grid.addWidget(self.lines_spacing_label, 6, 0)
+ lines_grid.addWidget(self.lines_spacing_entry, 6, 1)
- # ## Insert Copper Thieving
+ # #############################################################################################################
+ # ## Insert Copper Thieving BUTTON
+ # #############################################################################################################
self.fill_button = QtWidgets.QPushButton(_("Insert Copper thieving"))
self.fill_button.setIcon(QtGui.QIcon(self.app.resource_location + '/copperfill32.png'))
self.fill_button.setToolTip(
@@ -1594,29 +1627,33 @@ class ThievingUI:
font-weight: bold;
}
""")
- self.layout.addWidget(self.fill_button)
-
- # ## Grid Layout
- grid_lay_1 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid_lay_1)
- grid_lay_1.setColumnStretch(0, 0)
- grid_lay_1.setColumnStretch(1, 1)
- grid_lay_1.setColumnStretch(2, 0)
-
- separator_line_1 = QtWidgets.QFrame()
- separator_line_1.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line_1.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid_lay_1.addWidget(separator_line_1, 0, 0, 1, 3)
-
- # grid_lay_1.addWidget(FCLabel(''))
+ self.tools_box.addWidget(self.fill_button)
+ # #############################################################################################################
+ # ## Robber Bar Parameters
+ # #############################################################################################################
self.robber_bar_label = FCLabel('%s' %
_('Robber Bar Parameters').upper())
self.robber_bar_label.setToolTip(
_("Parameters used for the robber bar.\n"
"Robber bar = copper border to help in pattern hole plating.")
)
- grid_lay_1.addWidget(self.robber_bar_label, 2, 0, 1, 3)
+ self.tools_box.addWidget(self.robber_bar_label)
+
+ rob_frame = FCFrame()
+ self.tools_box.addWidget(rob_frame)
+
+ # ## Grid Layout
+ grid_lay_1 = FCGridLayout(v_spacing=5, h_spacing=3)
+ grid_lay_1.setColumnStretch(0, 0)
+ grid_lay_1.setColumnStretch(1, 1)
+ grid_lay_1.setColumnStretch(2, 0)
+ rob_frame.setLayout(grid_lay_1)
+
+ # separator_line_1 = QtWidgets.QFrame()
+ # separator_line_1.setFrameShape(QtWidgets.QFrame.Shape.HLine)
+ # separator_line_1.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
+ # grid_lay_1.addWidget(separator_line_1, 0, 0, 1, 3)
# ROBBER BAR MARGIN #
self.rb_margin_label = FCLabel('%s:' % _("Margin"))
@@ -1644,7 +1681,9 @@ class ThievingUI:
grid_lay_1.addWidget(self.rb_thickness_label, 6, 0)
grid_lay_1.addWidget(self.rb_thickness_entry, 6, 1, 1, 2)
+ # #############################################################################################################
# ## Insert Robber Bar
+ # #############################################################################################################
self.rb_button = QtWidgets.QPushButton(_("Insert Robber Bar"))
self.rb_button.setIcon(QtGui.QIcon(self.app.resource_location + '/robber32.png'))
self.rb_button.setToolTip(
@@ -1659,21 +1698,19 @@ class ThievingUI:
font-weight: bold;
}
""")
- grid_lay_1.addWidget(self.rb_button, 8, 0, 1, 3)
-
- separator_line_2 = QtWidgets.QFrame()
- separator_line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid_lay_1.addWidget(separator_line_2, 10, 0, 1, 3)
+ self.tools_box.addWidget(self.rb_button)
+ # #############################################################################################################
+ # Pattern plating Frame
+ # #############################################################################################################
self.patern_mask_label = FCLabel('%s' %
- _('Pattern Plating Mask').upper())
+ _('Pattern Plating Mask'))
self.patern_mask_label.setToolTip(
_("Generate a mask for pattern plating.")
)
- grid_lay_1.addWidget(self.patern_mask_label, 12, 0, 1, 3)
+ self.tools_box.addWidget(self.patern_mask_label)
- self.sm_obj_label = FCLabel("%s:" % _("Select Soldermask object"))
+ self.sm_obj_label = FCLabel('%s' % _("Source Object"))
self.sm_obj_label.setToolTip(
_("Gerber Object with the soldermask.\n"
"It will be used as a base for\n"
@@ -1686,15 +1723,25 @@ class ThievingUI:
self.sm_object_combo.is_last = True
self.sm_object_combo.obj_type = 'Gerber'
- grid_lay_1.addWidget(self.sm_obj_label, 14, 0, 1, 3)
- grid_lay_1.addWidget(self.sm_object_combo, 16, 0, 1, 3)
+ self.tools_box.addWidget(self.sm_obj_label)
+ self.tools_box.addWidget(self.sm_object_combo)
+
+ pp_frame = FCFrame()
+ self.tools_box.addWidget(pp_frame)
+
+ # ## Grid Layout
+ grid_lay_2 = FCGridLayout(v_spacing=5, h_spacing=3)
+ grid_lay_2.setColumnStretch(0, 0)
+ grid_lay_2.setColumnStretch(1, 1)
+ grid_lay_2.setColumnStretch(2, 0)
+ pp_frame.setLayout(grid_lay_2)
# Only Pads
self.only_pads_cb = FCCheckBox(_("Only Pads"))
self.only_pads_cb.setToolTip(
_("Select only pads in case the selected object is a copper Gerber.")
)
- grid_lay_1.addWidget(self.only_pads_cb, 17, 0, 1, 3)
+ grid_lay_2.addWidget(self.only_pads_cb, 0, 0, 1, 3)
# Openings CLEARANCE #
self.clearance_ppm_label = FCLabel('%s:' % _("Clearance"))
@@ -1707,8 +1754,8 @@ class ThievingUI:
self.clearance_ppm_entry.set_precision(self.decimals)
self.clearance_ppm_entry.setSingleStep(0.1)
- grid_lay_1.addWidget(self.clearance_ppm_label, 18, 0)
- grid_lay_1.addWidget(self.clearance_ppm_entry, 18, 1, 1, 2)
+ grid_lay_2.addWidget(self.clearance_ppm_label, 2, 0)
+ grid_lay_2.addWidget(self.clearance_ppm_entry, 2, 1, 1, 2)
# Plated area
self.plated_area_label = FCLabel('%s:' % _("Plated area"))
@@ -1728,9 +1775,9 @@ class ThievingUI:
else:
self.units_area_label = FCLabel('%s2' % _("in"))
- grid_lay_1.addWidget(self.plated_area_label, 20, 0)
- grid_lay_1.addWidget(self.plated_area_entry, 20, 1)
- grid_lay_1.addWidget(self.units_area_label, 20, 2)
+ grid_lay_2.addWidget(self.plated_area_label, 4, 0)
+ grid_lay_2.addWidget(self.plated_area_entry, 4, 1)
+ grid_lay_2.addWidget(self.units_area_label, 4, 2)
# Include geometry
self.ppm_choice_label = FCLabel('%s:' % _("Add"))
@@ -1743,10 +1790,12 @@ class ThievingUI:
{"label": _("Robber bar"), "value": "r"},
{"label": _("None"), "value": "n"}
], orientation='vertical', stretch=False)
- grid_lay_1.addWidget(self.ppm_choice_label, 22, 0)
- grid_lay_1.addWidget(self.ppm_choice_radio, 22, 1, 1, 2)
+ grid_lay_2.addWidget(self.ppm_choice_label, 6, 0)
+ grid_lay_2.addWidget(self.ppm_choice_radio, 6, 1, 1, 2)
- # ## Pattern Plating Mask
+ # #############################################################################################################
+ # ## Pattern Plating Mask Button
+ # #############################################################################################################
self.ppm_button = QtWidgets.QPushButton(_("Generate pattern plating mask"))
self.ppm_button.setIcon(QtGui.QIcon(self.app.resource_location + '/pattern32.png'))
self.ppm_button.setToolTip(
@@ -1760,7 +1809,7 @@ class ThievingUI:
font-weight: bold;
}
""")
- grid_lay_1.addWidget(self.ppm_button, 24, 0, 1, 3)
+ self.tools_box.addWidget(self.ppm_button)
self.layout.addStretch(1)
diff --git a/appPlugins/ToolCorners.py b/appPlugins/ToolCorners.py
index 025c3015..3c256689 100644
--- a/appPlugins/ToolCorners.py
+++ b/appPlugins/ToolCorners.py
@@ -749,9 +749,6 @@ class CornersUI:
self.tools_box.addWidget(self.param_label)
par_frame = FCFrame()
- par_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- par_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(par_frame)
# ## Grid Layout
@@ -822,9 +819,6 @@ class CornersUI:
self.tools_box.addWidget(self.locs_label)
self.loc_frame = FCFrame()
- self.loc_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # self.loc_frame.setContentsMargins(0, 0, 0, 0)
- self.loc_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(self.loc_frame)
# Grid Layout
@@ -864,9 +858,6 @@ class CornersUI:
self.tools_box.addWidget(self.sel_label)
self.s_frame = FCFrame()
- self.s_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- self.s_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(self.s_frame)
# Grid Layout
@@ -914,9 +905,6 @@ class CornersUI:
self.tools_box.addWidget(self.drills_label)
self.drill_frame = FCFrame()
- self.drill_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # drill_frame.setContentsMargins(0, 0, 0, 0)
- self.drill_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(self.drill_frame)
# Grid Layout
diff --git a/appPlugins/ToolCutOut.py b/appPlugins/ToolCutOut.py
index adbb8742..0bb17911 100644
--- a/appPlugins/ToolCutOut.py
+++ b/appPlugins/ToolCutOut.py
@@ -2329,9 +2329,6 @@ class CutoutUI:
# Object Frame
# #############################################################################################################
obj_frame = FCFrame()
- obj_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- obj_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(obj_frame)
# Grid Layout
@@ -2387,9 +2384,6 @@ class CutoutUI:
# Tool Frame
# #############################################################################################################
tool_frame = FCFrame()
- tool_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- tool_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(tool_frame)
# Grid Layout
@@ -2450,9 +2444,6 @@ class CutoutUI:
# Tool Params Frame
# #############################################################################################################
tool_par_frame = FCFrame()
- tool_par_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- tool_par_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(tool_par_frame)
# Grid Layout
@@ -2767,9 +2758,6 @@ class CutoutUI:
# Cut by Drilling Frame
# #############################################################################################################
self.drill_cut_frame = FCFrame()
- self.drill_cut_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- self.drill_cut_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(self.drill_cut_frame)
# Grid Layout
diff --git a/appPlugins/ToolDblSided.py b/appPlugins/ToolDblSided.py
index da849ee9..a8871027 100644
--- a/appPlugins/ToolDblSided.py
+++ b/appPlugins/ToolDblSided.py
@@ -681,9 +681,6 @@ class DsidedUI:
self.tools_box.addWidget(self.m_objects_label)
source_frame = FCFrame()
- source_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- source_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(source_frame)
# ## Grid Layout
@@ -733,9 +730,6 @@ class DsidedUI:
self.tools_box.addWidget(self.bv_label)
self.bounds_frame = FCFrame()
- self.bounds_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- self.bounds_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(self.bounds_frame)
grid1 = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -836,9 +830,6 @@ class DsidedUI:
self.tools_box.addWidget(self.param_label)
mirror_frame = FCFrame()
- mirror_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- mirror_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(mirror_frame)
grid2 = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -990,9 +981,6 @@ class DsidedUI:
self.tools_box.addWidget(self.alignment_label)
align_frame = FCFrame()
- align_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- align_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(align_frame)
grid4 = FCGridLayout(v_spacing=5, h_spacing=3)
diff --git a/appPlugins/ToolDrilling.py b/appPlugins/ToolDrilling.py
index c6b4288e..bbbd57ae 100644
--- a/appPlugins/ToolDrilling.py
+++ b/appPlugins/ToolDrilling.py
@@ -2330,9 +2330,6 @@ class DrillingUI:
self.tools_box.addWidget(self.tools_table_label)
tt_frame = FCFrame()
- tt_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- tt_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(tt_frame)
# Grid Layout
@@ -2415,9 +2412,6 @@ class DrillingUI:
# Tool Parameters Frame
# #############################################################################################################
tp_frame = FCFrame()
- tp_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- tp_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.exc_tools_box.addWidget(tp_frame)
# Grid Layout
@@ -2644,9 +2638,6 @@ class DrillingUI:
self.exc_tools_box.addWidget(self.gen_param_label)
gp_frame = FCFrame()
- gp_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- gp_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.exc_tools_box.addWidget(gp_frame)
grid3 = FCGridLayout(v_spacing=5, h_spacing=3)
diff --git a/appPlugins/ToolMilling.py b/appPlugins/ToolMilling.py
index aa89c7c8..aca56dbb 100644
--- a/appPlugins/ToolMilling.py
+++ b/appPlugins/ToolMilling.py
@@ -3501,15 +3501,8 @@ class MillingUI:
self.decimals = self.app.decimals
self.layout = layout
- self.tools_frame = QtWidgets.QFrame()
- self.tools_frame.setContentsMargins(0, 0, 0, 0)
- self.layout.addWidget(self.tools_frame)
- self.tools_box = QtWidgets.QVBoxLayout()
- self.tools_box.setContentsMargins(0, 0, 0, 0)
- self.tools_frame.setLayout(self.tools_box)
-
self.title_box = QtWidgets.QHBoxLayout()
- self.tools_box.addLayout(self.title_box)
+ self.layout.addLayout(self.title_box)
# ## Title
title_label = FCLabel("%s" % name)
@@ -3539,6 +3532,13 @@ class MillingUI:
self.level.setCheckable(True)
self.title_box.addWidget(self.level)
+ self.tools_frame = QtWidgets.QFrame()
+ self.tools_frame.setContentsMargins(0, 0, 0, 0)
+ self.layout.addWidget(self.tools_frame)
+ self.tools_box = QtWidgets.QVBoxLayout()
+ self.tools_box.setContentsMargins(0, 0, 0, 0)
+ self.tools_frame.setLayout(self.tools_box)
+
# #############################################################################################################
# Source Object for Milling Frame
# #############################################################################################################
@@ -3549,9 +3549,6 @@ class MillingUI:
self.tools_box.addWidget(self.obj_combo_label)
obj_frame = FCFrame()
- obj_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- obj_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(obj_frame)
# Grid Layout
@@ -3614,9 +3611,6 @@ class MillingUI:
grid_title_tool_table.addWidget(self.plot_cb, 0, 1)
tt_frame = FCFrame()
- tt_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- tt_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(tt_frame)
# Grid Layout
@@ -3879,9 +3873,6 @@ class MillingUI:
# #############################################################################################################
tp_frame = FCFrame()
- tp_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- tp_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tool_params_box.addWidget(tp_frame)
# Grid Layout
@@ -4323,9 +4314,6 @@ class MillingUI:
self.tool_params_box.addWidget(self.gen_param_label)
gp_frame = FCFrame()
- gp_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- gp_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tool_params_box.addWidget(gp_frame)
grid3 = FCGridLayout(v_spacing=5, h_spacing=3)
diff --git a/appPlugins/ToolPanelize.py b/appPlugins/ToolPanelize.py
index ba3badd1..f7350f28 100644
--- a/appPlugins/ToolPanelize.py
+++ b/appPlugins/ToolPanelize.py
@@ -1133,9 +1133,6 @@ class PanelizeUI:
self.tools_box.addWidget(self.object_label)
obj_frame = FCFrame()
- obj_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- obj_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(obj_frame)
# Grid Layout
@@ -1187,9 +1184,6 @@ class PanelizeUI:
self.tools_box.addWidget(self.box_label)
pr_frame = FCFrame()
- pr_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- pr_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(pr_frame)
# Grid Layout
@@ -1248,9 +1242,6 @@ class PanelizeUI:
self.tools_box.addWidget(panel_data_label)
pd_frame = FCFrame()
- pd_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- pd_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(pd_frame)
grid2 = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -1314,9 +1305,6 @@ class PanelizeUI:
self.tools_box.addWidget(self.param_label)
self.gp_frame = FCFrame()
- self.gp_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- self.gp_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(self.gp_frame)
grid3 = FCGridLayout(v_spacing=5, h_spacing=3)
diff --git a/appPlugins/ToolPunchGerber.py b/appPlugins/ToolPunchGerber.py
index 82ca075a..a546bdf3 100644
--- a/appPlugins/ToolPunchGerber.py
+++ b/appPlugins/ToolPunchGerber.py
@@ -2028,9 +2028,6 @@ class PunchUI:
# Processed Pads Frame
# #############################################################################################################
tt_frame = FCFrame()
- tt_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- tt_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(tt_frame)
pad_all_grid = FCGridLayout(v_spacing=5, h_spacing=3)
@@ -2128,9 +2125,6 @@ class PunchUI:
self.tools_box.addWidget(self.method_label)
m_frame = FCFrame()
- m_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- m_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(m_frame)
# Grid Layout
@@ -2305,9 +2299,6 @@ class PunchUI:
self.tools_box.addWidget(self.sel_label)
self.s_frame = FCFrame()
- self.s_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # units_frame.setContentsMargins(0, 0, 0, 0)
- self.s_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(self.s_frame)
# Grid Layout
diff --git a/appPlugins/ToolQRCode.py b/appPlugins/ToolQRCode.py
index d8c718ac..474fa606 100644
--- a/appPlugins/ToolQRCode.py
+++ b/appPlugins/ToolQRCode.py
@@ -799,9 +799,6 @@ class QRcodeUI:
self.tools_box.addWidget(self.text_label)
tq_frame = FCFrame()
- tq_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # tq_frame.setContentsMargins(0, 0, 0, 0)
- tq_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(tq_frame)
# Grid Layout
@@ -832,9 +829,6 @@ class QRcodeUI:
self.tools_box.addWidget(self.qrcode_label)
p_frame = FCFrame()
- p_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- # p_frame.setContentsMargins(0, 0, 0, 0)
- p_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(p_frame)
# ## Grid Layout
@@ -951,8 +945,6 @@ class QRcodeUI:
# this way I can hide/show the frame
self.export_frame = FCFrame()
- self.export_frame.setFrameStyle(QtWidgets.QFrame.Shape.StyledPanel | QtWidgets.QFrame.Shadow.Plain)
- self.export_frame.setStyleSheet(".FCFrame{border: 1px solid gray; border-radius: 5px;}")
self.tools_box.addWidget(self.export_frame)
self.export_lay = FCGridLayout(v_spacing=5, h_spacing=3)