diff --git a/CHANGELOG.md b/CHANGELOG.md
index 48d9cd42..5b8a17e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,12 @@ CHANGELOG for FlatCAM beta
=================================================
+1.10.2021
+
+- clicking the splash screen will close it; also if an error is triggered, the error message will pop over the splash screen
+- the Aperture Table in the Gerber Editor is no longer extended to show all apertures at once
+- in Preferences: Excellon, Geometry and CNCJob tabs, updated the UI to the new design
+
29.09.2021
- more UI changes in the Preferences to align them to the new app look
diff --git a/appEditors/AppGerberEditor.py b/appEditors/AppGerberEditor.py
index ea3b2255..c42bd042 100644
--- a/appEditors/AppGerberEditor.py
+++ b/appEditors/AppGerberEditor.py
@@ -3687,7 +3687,6 @@ class AppGerberEditor(QtCore.QObject):
vertical_header = self.ui.apertures_table.verticalHeader()
# vertical_header.setSectionResizeMode(QtWidgets.QHeaderView.ResizeMode.ResizeToContents)
vertical_header.hide()
- self.ui.apertures_table.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
horizontal_header = self.ui.apertures_table.horizontalHeader()
horizontal_header.setMinimumSectionSize(10)
@@ -3700,8 +3699,10 @@ class AppGerberEditor(QtCore.QObject):
horizontal_header.setSectionResizeMode(4, QtWidgets.QHeaderView.ResizeMode.Stretch)
self.ui.apertures_table.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
+ # self.ui.apertures_table.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
+
self.ui.apertures_table.setSortingEnabled(False)
- self.ui.apertures_table.setMinimumHeight(self.ui.apertures_table.getHeight())
+ # self.ui.apertures_table.setMinimumHeight(self.ui.apertures_table.getHeight())
self.ui.apertures_table.setMaximumHeight(self.ui.apertures_table.getHeight())
# make sure no rows are selected so the user have to click the correct row, meaning selecting the correct tool
diff --git a/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py
index 5ae3e2b1..c9dd6e34 100644
--- a/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py
+++ b/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py
@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
-from appGUI.GUIElements import FCComboBox, FCSpinner, FCColorEntry, FCLabel, FCGridLayout
+from appGUI.GUIElements import FCSpinner, FCColorEntry, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
@@ -20,16 +20,21 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
self.setTitle(str(_("CNC Job Adv. Options")))
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
-
- # ## Export G-Code
- self.export_gcode_label = FCLabel("%s:" % _("Parameters"))
+ # #############################################################################################################
+ # PARAMETERS Frame
+ # #############################################################################################################
+ self.export_gcode_label = FCLabel('%s' % _("Parameters"))
self.export_gcode_label.setToolTip(
_("Export and save G-Code to\n"
"make this object to a file.")
)
- grid0.addWidget(self.export_gcode_label, 0, 0, 1, 2)
+ self.layout.addWidget(self.export_gcode_label)
+
+ param_frame = FCFrame()
+ self.layout.addWidget(param_frame)
+
+ param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ param_frame.setLayout(param_grid)
# Annotation Font Size
self.annotation_fontsize_label = FCLabel('%s:' % _("Annotation Size"))
@@ -39,8 +44,8 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
self.annotation_fontsize_sp = FCSpinner()
self.annotation_fontsize_sp.set_range(0, 9999)
- grid0.addWidget(self.annotation_fontsize_label, 2, 0)
- grid0.addWidget(self.annotation_fontsize_sp, 2, 1)
+ param_grid.addWidget(self.annotation_fontsize_label, 0, 0)
+ param_grid.addWidget(self.annotation_fontsize_sp, 0, 1)
# Annotation Font Color
self.annotation_color_label = FCLabel('%s:' % _('Annotation Color'))
@@ -49,8 +54,8 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
)
self.annotation_fontcolor_entry = FCColorEntry()
- grid0.addWidget(self.annotation_color_label, 4, 0)
- grid0.addWidget(self.annotation_fontcolor_entry, 4, 1)
+ param_grid.addWidget(self.annotation_color_label, 2, 0)
+ param_grid.addWidget(self.annotation_fontcolor_entry, 2, 1)
self.layout.addStretch(1)
diff --git a/appGUI/preferences/cncjob/CNCJobEditorPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobEditorPrefGroupUI.py
index 50a16361..114d2ae7 100644
--- a/appGUI/preferences/cncjob/CNCJobEditorPrefGroupUI.py
+++ b/appGUI/preferences/cncjob/CNCJobEditorPrefGroupUI.py
@@ -1,7 +1,7 @@
from PyQt6 import QtGui
from PyQt6.QtCore import QSettings
-from appGUI.GUIElements import FCTextArea, FCLabel
+from appGUI.GUIElements import FCTextArea, FCLabel, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -22,8 +22,10 @@ class CNCJobEditorPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # Editor Parameters
- self.param_label = FCLabel("%s:" % _("Parameters"))
+ # #############################################################################################################
+ # PARAMETERS Frame
+ # #############################################################################################################
+ self.param_label = FCLabel('%s' % _("Parameters"))
self.param_label.setToolTip(
_("A list of Editor parameters.")
)
diff --git a/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py
index c3f2e2a2..3c24e8a5 100644
--- a/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py
+++ b/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py
@@ -1,7 +1,7 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCCheckBox, RadioSet, FCSpinner, FCDoubleSpinner, FCSliderWithSpinner, FCColorEntry, \
- FCLabel, FCGridLayout
+ FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
@@ -21,17 +21,22 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # ## Plot options
- self.plot_options_label = FCLabel("%s:" % _("Plot Options"))
+ # #############################################################################################################
+ # Plot Frame
+ # #############################################################################################################
+ self.plot_options_label = FCLabel('%s' % _("Plot Options"))
self.layout.addWidget(self.plot_options_label)
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
+ plot_frame = FCFrame()
+ self.layout.addWidget(plot_frame)
+
+ plot_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ plot_frame.setLayout(plot_grid)
# Plot CB
self.plot_cb = FCCheckBox(_('Plot Object'))
self.plot_cb.setToolTip(_("Plot (show) this object."))
- grid0.addWidget(self.plot_cb, 0, 0, 1, 2)
+ plot_grid.addWidget(self.plot_cb, 0, 0, 1, 2)
# ###################################################################
# Number of circle steps for circular aperture linear approximation #
@@ -41,10 +46,12 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
_("The number of circle steps for GCode \n"
"circle and arc shapes linear approximation.")
)
- grid0.addWidget(self.steps_per_circle_label, 3, 0)
+
self.steps_per_circle_entry = FCSpinner()
self.steps_per_circle_entry.set_range(0, 99999)
- grid0.addWidget(self.steps_per_circle_entry, 3, 1)
+
+ plot_grid.addWidget(self.steps_per_circle_label, 2, 0)
+ plot_grid.addWidget(self.steps_per_circle_entry, 2, 1)
# Tool dia for plot
tdlabel = FCLabel('%s:' % _('Travel dia'))
@@ -58,11 +65,19 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
self.tooldia_entry.setSingleStep(0.1)
self.tooldia_entry.setWrapping(True)
- grid0.addWidget(tdlabel, 4, 0)
- grid0.addWidget(self.tooldia_entry, 4, 1)
+ plot_grid.addWidget(tdlabel, 4, 0)
+ plot_grid.addWidget(self.tooldia_entry, 4, 1)
- # add a space
- grid0.addWidget(FCLabel('%s:' % _("G-code Decimals")), 5, 0, 1, 2)
+ # #############################################################################################################
+ # Decimals Frame
+ # #############################################################################################################
+ self.layout.addWidget(FCLabel('%s' % _("G-code Decimals")))
+
+ dec_frame = FCFrame()
+ self.layout.addWidget(dec_frame)
+
+ dec_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ dec_frame.setLayout(dec_grid)
# Number of decimals to use in GCODE coordinates
cdeclabel = FCLabel('%s:' % _('Coordinates'))
@@ -74,8 +89,8 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
self.coords_dec_entry.set_range(0, 9)
self.coords_dec_entry.setWrapping(True)
- grid0.addWidget(cdeclabel, 6, 0)
- grid0.addWidget(self.coords_dec_entry, 6, 1)
+ dec_grid.addWidget(cdeclabel, 0, 0)
+ dec_grid.addWidget(self.coords_dec_entry, 0, 1)
# Number of decimals to use in GCODE feedrate
frdeclabel = FCLabel('%s:' % _('Feedrate'))
@@ -87,8 +102,8 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
self.fr_dec_entry.set_range(0, 9)
self.fr_dec_entry.setWrapping(True)
- grid0.addWidget(frdeclabel, 7, 0)
- grid0.addWidget(self.fr_dec_entry, 7, 1)
+ dec_grid.addWidget(frdeclabel, 2, 0)
+ dec_grid.addWidget(self.fr_dec_entry, 2, 1)
# The type of coordinates used in the Gcode: Absolute or Incremental
coords_type_label = FCLabel('%s:' % _('Coordinates type'))
@@ -102,8 +117,8 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
{"label": _("Absolute"), "value": "G90"},
{"label": _("Incremental"), "value": "G91"}
], orientation='vertical', compact=True)
- grid0.addWidget(coords_type_label, 8, 0)
- grid0.addWidget(self.coords_type_radio, 8, 1)
+ dec_grid.addWidget(coords_type_label, 4, 0)
+ dec_grid.addWidget(self.coords_type_radio, 4, 1)
# hidden for the time being, until implemented
coords_type_label.hide()
@@ -116,16 +131,24 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
"(\\r\\n) on non-Windows OS's.")
)
- grid0.addWidget(self.line_ending_cb, 9, 0, 1, 3)
+ dec_grid.addWidget(self.line_ending_cb, 6, 0, 1, 3)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid0.addWidget(separator_line, 12, 0, 1, 2)
+ # separator_line = QtWidgets.QFrame()
+ # separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
+ # separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
+ # plot_grid.addWidget(separator_line, 12, 0, 1, 2)
- # Travel Line Color
- self.travel_color_label = FCLabel('%s' % _('Travel Line Color'))
- grid0.addWidget(self.travel_color_label, 13, 0, 1, 2)
+ # #############################################################################################################
+ # Travel Frame
+ # #############################################################################################################
+ self.travel_color_label = FCLabel('%s' % _('Travel Line Color'))
+ self.layout.addWidget(self.travel_color_label)
+
+ travel_frame = FCFrame()
+ self.layout.addWidget(travel_frame)
+
+ travel_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ travel_frame.setLayout(travel_grid)
# Plot Line Color
self.tline_color_label = FCLabel('%s:' % _('Outline'))
@@ -134,8 +157,8 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
)
self.tline_color_entry = FCColorEntry()
- grid0.addWidget(self.tline_color_label, 14, 0)
- grid0.addWidget(self.tline_color_entry, 14, 1)
+ travel_grid.addWidget(self.tline_color_label, 0, 0)
+ travel_grid.addWidget(self.tline_color_entry, 0, 1)
# Plot Fill Color
self.tfill_color_label = FCLabel('%s:' % _('Fill'))
@@ -146,8 +169,8 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
)
self.tfill_color_entry = FCColorEntry()
- grid0.addWidget(self.tfill_color_label, 15, 0)
- grid0.addWidget(self.tfill_color_entry, 15, 1)
+ travel_grid.addWidget(self.tfill_color_label, 2, 0)
+ travel_grid.addWidget(self.tfill_color_entry, 2, 1)
# Plot Fill Transparency Level
self.cncjob_alpha_label = FCLabel('%s:' % _('Alpha'))
@@ -156,17 +179,25 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
)
self.cncjob_alpha_entry = FCSliderWithSpinner(0, 255, 1)
- grid0.addWidget(self.cncjob_alpha_label, 16, 0)
- grid0.addWidget(self.cncjob_alpha_entry, 16, 1)
+ travel_grid.addWidget(self.cncjob_alpha_label, 4, 0)
+ travel_grid.addWidget(self.cncjob_alpha_entry, 4, 1)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid0.addWidget(separator_line, 17, 0, 1, 2)
+ # separator_line = QtWidgets.QFrame()
+ # separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
+ # separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
+ # plot_grid.addWidget(separator_line, 17, 0, 1, 2)
- # CNCJob Object Color
- self.cnc_color_label = FCLabel('%s' % _('Object Color'))
- grid0.addWidget(self.cnc_color_label, 18, 0, 1, 2)
+ # #############################################################################################################
+ # Object Color Frame
+ # #############################################################################################################
+ self.cnc_color_label = FCLabel('%s' % _('Object Color'))
+ self.layout.addWidget(self.cnc_color_label)
+
+ obj_frame = FCFrame()
+ self.layout.addWidget(obj_frame)
+
+ obj_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ obj_frame.setLayout(obj_grid)
# Plot Line Color
self.line_color_label = FCLabel('%s:' % _('Outline'))
@@ -175,8 +206,8 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
)
self.line_color_entry = FCColorEntry()
- grid0.addWidget(self.line_color_label, 19, 0)
- grid0.addWidget(self.line_color_entry, 19, 1)
+ obj_grid.addWidget(self.line_color_label, 0, 0)
+ obj_grid.addWidget(self.line_color_entry, 0, 1)
# Plot Fill Color
self.fill_color_label = FCLabel('%s:' % _('Fill'))
@@ -187,8 +218,10 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
)
self.fill_color_entry = FCColorEntry()
- grid0.addWidget(self.fill_color_label, 20, 0)
- grid0.addWidget(self.fill_color_entry, 20, 1)
+ obj_grid.addWidget(self.fill_color_label, 2, 0)
+ obj_grid.addWidget(self.fill_color_entry, 2, 1)
+
+ FCGridLayout.set_common_column_size([plot_grid, dec_grid, travel_grid, obj_grid], 0)
self.layout.addStretch()
diff --git a/appGUI/preferences/cncjob/CNCJobOptPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobOptPrefGroupUI.py
index a7819c6d..d0654c94 100644
--- a/appGUI/preferences/cncjob/CNCJobOptPrefGroupUI.py
+++ b/appGUI/preferences/cncjob/CNCJobOptPrefGroupUI.py
@@ -1,7 +1,7 @@
-from PyQt6 import QtWidgets, QtGui
+from PyQt6 import QtGui
from PyQt6.QtCore import QSettings
-from appGUI.GUIElements import RadioSet, FCCheckBox, FCLabel, FCGridLayout
+from appGUI.GUIElements import RadioSet, FCCheckBox, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -22,8 +22,10 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # ## Export G-Code
- self.export_gcode_label = FCLabel("%s:" % _("Export G-Code"))
+ # #############################################################################################################
+ # GCode Frame
+ # #############################################################################################################
+ self.export_gcode_label = FCLabel('%s' % _("Export G-Code"))
self.export_gcode_label.setToolTip(
_("Export and save G-Code to\n"
"make this object to a file.")
@@ -38,8 +40,11 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
font = QtGui.QFont()
font.setPointSize(tb_fsize)
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
+ gcode_frame = FCFrame()
+ self.layout.addWidget(gcode_frame)
+
+ gcode_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ gcode_frame.setLayout(gcode_grid)
# Plot Kind
self.cncplot_method_label = FCLabel('%s:' % _("Plot kind"))
@@ -54,11 +59,10 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
{"label": _("All"), "value": "all"},
{"label": _("Travel"), "value": "travel"},
{"label": _("Cut"), "value": "cut"}
- ], orientation='vertical', compact=True)
+ ], orientation='vertical')
- grid0.addWidget(self.cncplot_method_label, 1, 0)
- grid0.addWidget(self.cncplot_method_radio, 1, 1)
- grid0.addWidget(FCLabel(''), 1, 2)
+ gcode_grid.addWidget(self.cncplot_method_label, 0, 0)
+ gcode_grid.addWidget(self.cncplot_method_radio, 0, 1)
# Display Annotation
self.annotation_cb = FCCheckBox(_("Display Annotation"))
@@ -69,6 +73,6 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
)
)
- grid0.addWidget(self.annotation_cb, 2, 0, 1, 3)
+ gcode_grid.addWidget(self.annotation_cb, 2, 0, 1, 2)
- self.layout.addStretch()
+ # self.layout.addStretch()
diff --git a/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py
index ccc5d16e..182c04c5 100644
--- a/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py
+++ b/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py
@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
-from appGUI.GUIElements import FCCheckBox, FCLabel, FCGridLayout
+from appGUI.GUIElements import FCCheckBox, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
@@ -21,11 +21,10 @@ class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # #######################
- # ## ADVANCED OPTIONS ###
- # #######################
-
- self.exc_label = FCLabel('%s:' % _('Advanced Options'))
+ # #############################################################################################################
+ # PARAMETERS Frame
+ # #############################################################################################################
+ self.exc_label = FCLabel('%s' % _('Advanced Options'))
self.exc_label.setToolTip(
_("A list of advanced parameters.\n"
"Those parameters are available only for\n"
@@ -33,15 +32,18 @@ class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.exc_label)
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
+ param_frame = FCFrame()
+ self.layout.addWidget(param_frame)
+
+ param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ param_frame.setLayout(param_grid)
# Table Visibility CB
self.table_visibility_cb = FCCheckBox(label=_('Table Show/Hide'))
self.table_visibility_cb.setToolTip(
_("Toggle the display of the Tools Table.")
)
- grid0.addWidget(self.table_visibility_cb, 0, 0, 1, 2)
+ param_grid.addWidget(self.table_visibility_cb, 0, 0, 1, 2)
# Auto Load Tools from DB
self.autoload_db_cb = FCCheckBox('%s' % _("Auto load from DB"))
@@ -49,6 +51,6 @@ class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
_("Automatic replacement of the tools from related application tools\n"
"with tools from DB that have a close diameter value.")
)
- grid0.addWidget(self.autoload_db_cb, 1, 0, 1, 2)
+ param_grid.addWidget(self.autoload_db_cb, 2, 0, 1, 2)
- self.layout.addStretch()
+ # self.layout.addStretch()
diff --git a/appGUI/preferences/excellon/ExcellonEditorPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonEditorPrefGroupUI.py
index 650deede..a7ea51a7 100644
--- a/appGUI/preferences/excellon/ExcellonEditorPrefGroupUI.py
+++ b/appGUI/preferences/excellon/ExcellonEditorPrefGroupUI.py
@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
-from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout
+from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -20,15 +20,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # Excellon Editor Parameters
- self.param_label = FCLabel("%s:" % _("Parameters"))
+ # #############################################################################################################
+ # PARAMETERS Frame
+ # #############################################################################################################
+ self.param_label = FCLabel('%s' % _("Parameters"))
self.param_label.setToolTip(
_("A list of Excellon Editor parameters.")
)
self.layout.addWidget(self.param_label)
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
+ param_frame = FCFrame()
+ self.layout.addWidget(param_frame)
+
+ param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ param_frame.setLayout(param_grid)
# Selection Limit
self.sel_limit_label = FCLabel('%s:' % _("Selection limit"))
@@ -42,8 +47,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.sel_limit_entry = FCSpinner()
self.sel_limit_entry.set_range(0, 99999)
- grid0.addWidget(self.sel_limit_label, 0, 0)
- grid0.addWidget(self.sel_limit_entry, 0, 1)
+ param_grid.addWidget(self.sel_limit_label, 0, 0)
+ param_grid.addWidget(self.sel_limit_entry, 0, 1)
# New Diameter
self.addtool_entry_lbl = FCLabel('%s:' % _('New Dia'))
@@ -55,8 +60,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.addtool_entry.set_range(0.000001, 99.9999)
self.addtool_entry.set_precision(self.decimals)
- grid0.addWidget(self.addtool_entry_lbl, 1, 0)
- grid0.addWidget(self.addtool_entry, 1, 1)
+ param_grid.addWidget(self.addtool_entry_lbl, 2, 0)
+ param_grid.addWidget(self.addtool_entry, 2, 1)
# Number of drill holes in a drill array
self.drill_array_size_label = FCLabel('%s:' % _('Nr of drills'))
@@ -68,11 +73,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.drill_array_size_entry = FCSpinner()
self.drill_array_size_entry.set_range(0, 9999)
- grid0.addWidget(self.drill_array_size_label, 2, 0)
- grid0.addWidget(self.drill_array_size_entry, 2, 1)
+ param_grid.addWidget(self.drill_array_size_label, 4, 0)
+ param_grid.addWidget(self.drill_array_size_entry, 4, 1)
- self.drill_array_linear_label = FCLabel('%s:' % _('Linear Drill Array'))
- grid0.addWidget(self.drill_array_linear_label, 3, 0, 1, 2)
+ # #############################################################################################################
+ # Linear Array Frame
+ # #############################################################################################################
+ self.drill_array_linear_label = FCLabel('%s' % _('Linear Drill Array'))
+ self.layout.addWidget(self.drill_array_linear_label)
+
+ lin_frame = FCFrame()
+ self.layout.addWidget(lin_frame)
+
+ lin_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ lin_frame.setLayout(lin_grid)
# Linear Drill Array direction
self.drill_axis_label = FCLabel('%s:' % _('Linear Direction'))
@@ -85,10 +99,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
# self.drill_axis_label.setMinimumWidth(100)
self.drill_axis_radio = RadioSet([{'label': _('X'), 'value': 'X'},
{'label': _('Y'), 'value': 'Y'},
- {'label': _('Angle'), 'value': 'A'}])
+ {'label': _('Angle'), 'value': 'A'}], compact=True)
- grid0.addWidget(self.drill_axis_label, 4, 0)
- grid0.addWidget(self.drill_axis_radio, 4, 1)
+ lin_grid.addWidget(self.drill_axis_label, 0, 0)
+ lin_grid.addWidget(self.drill_axis_radio, 0, 1)
# Linear Drill Array pitch distance
self.drill_pitch_label = FCLabel('%s:' % _('Pitch'))
@@ -100,8 +114,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.drill_pitch_entry.set_range(0, 910000.0000)
self.drill_pitch_entry.set_precision(self.decimals)
- grid0.addWidget(self.drill_pitch_label, 5, 0)
- grid0.addWidget(self.drill_pitch_entry, 5, 1)
+ lin_grid.addWidget(self.drill_pitch_label, 2, 0)
+ lin_grid.addWidget(self.drill_pitch_entry, 2, 1)
# Linear Drill Array custom angle
self.drill_angle_label = FCLabel('%s:' % _('Angle'))
@@ -114,11 +128,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.drill_angle_entry.setWrapping(True)
self.drill_angle_entry.setSingleStep(5)
- grid0.addWidget(self.drill_angle_label, 6, 0)
- grid0.addWidget(self.drill_angle_entry, 6, 1)
+ lin_grid.addWidget(self.drill_angle_label, 4, 0)
+ lin_grid.addWidget(self.drill_angle_entry, 4, 1)
- self.drill_array_circ_label = FCLabel('%s:' % _('Circular Drill Array'))
- grid0.addWidget(self.drill_array_circ_label, 7, 0, 1, 2)
+ # #############################################################################################################
+ # Circular Array Frame
+ # #############################################################################################################
+ self.drill_array_circ_label = FCLabel('%s' % _('Circular Drill Array'))
+ self.layout.addWidget(self.drill_array_circ_label)
+
+ circ_frame = FCFrame()
+ self.layout.addWidget(circ_frame)
+
+ circ_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ circ_frame.setLayout(circ_grid)
# Circular Drill Array direction
self.drill_circular_direction_label = FCLabel('%s:' % _('Circular Direction'))
@@ -128,10 +151,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
)
self.drill_circular_dir_radio = RadioSet([{'label': _('CW'), 'value': 'CW'},
- {'label': _('CCW'), 'value': 'CCW'}])
+ {'label': _('CCW'), 'value': 'CCW'}], compact=True)
- grid0.addWidget(self.drill_circular_direction_label, 8, 0)
- grid0.addWidget(self.drill_circular_dir_radio, 8, 1)
+ circ_grid.addWidget(self.drill_circular_direction_label, 0, 0)
+ circ_grid.addWidget(self.drill_circular_dir_radio, 0, 1)
# Circular Drill Array Angle
self.drill_circular_angle_label = FCLabel('%s:' % _('Circular Angle'))
@@ -144,13 +167,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.drill_circular_angle_entry.setWrapping(True)
self.drill_circular_angle_entry.setSingleStep(5)
- grid0.addWidget(self.drill_circular_angle_label, 9, 0)
- grid0.addWidget(self.drill_circular_angle_entry, 9, 1)
+ circ_grid.addWidget(self.drill_circular_angle_label, 2, 0)
+ circ_grid.addWidget(self.drill_circular_angle_entry, 2, 1)
- # ##### SLOTS #####
- # #################
- self.drill_array_circ_label = FCLabel('%s:' % _('Slots'))
- grid0.addWidget(self.drill_array_circ_label, 10, 0, 1, 2)
+ # #############################################################################################################
+ # Slots Frame
+ # #############################################################################################################
+ self.drill_array_circ_label = FCLabel('%s' % _('Slots'))
+ self.layout.addWidget(self.drill_array_circ_label)
+
+ slots_frame = FCFrame()
+ self.layout.addWidget(slots_frame)
+
+ slots_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ slots_frame.setLayout(slots_grid)
# Slot length
self.slot_length_label = FCLabel('%s:' % _('Length'))
@@ -165,8 +195,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.slot_length_entry.setWrapping(True)
self.slot_length_entry.setSingleStep(1)
- grid0.addWidget(self.slot_length_label, 11, 0)
- grid0.addWidget(self.slot_length_entry, 11, 1)
+ slots_grid.addWidget(self.slot_length_label, 0, 0)
+ slots_grid.addWidget(self.slot_length_entry, 0, 1)
# Slot direction
self.slot_axis_label = FCLabel('%s:' % _('Direction'))
@@ -180,9 +210,9 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.slot_axis_radio = RadioSet([{'label': _('X'), 'value': 'X'},
{'label': _('Y'), 'value': 'Y'},
- {'label': _('Angle'), 'value': 'A'}])
- grid0.addWidget(self.slot_axis_label, 12, 0)
- grid0.addWidget(self.slot_axis_radio, 12, 1)
+ {'label': _('Angle'), 'value': 'A'}], compact=True)
+ slots_grid.addWidget(self.slot_axis_label, 2, 0)
+ slots_grid.addWidget(self.slot_axis_radio, 2, 1)
# Slot custom angle
self.slot_angle_label = FCLabel('%s:' % _('Angle'))
@@ -200,14 +230,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.slot_angle_spinner.setRange(-359.99, 360.00)
self.slot_angle_spinner.setSingleStep(5)
- grid0.addWidget(self.slot_angle_label, 13, 0)
- grid0.addWidget(self.slot_angle_spinner, 13, 1)
+ slots_grid.addWidget(self.slot_angle_label, 4, 0)
+ slots_grid.addWidget(self.slot_angle_spinner, 4, 1)
- # #### SLOTS ARRAY #######
- # ########################
+ # #############################################################################################################
+ # Slots Array Frame
+ # #############################################################################################################
+ self.slot_array_linear_label = FCLabel('%s' % _('Linear Slot Array'))
+ self.layout.addWidget(self.slot_array_linear_label)
- self.slot_array_linear_label = FCLabel('%s:' % _('Linear Slot Array'))
- grid0.addWidget(self.slot_array_linear_label, 14, 0, 1, 2)
+ slot_array_frame = FCFrame()
+ self.layout.addWidget(slot_array_frame)
+
+ slot_array_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ slot_array_frame.setLayout(slot_array_grid)
# Number of slot holes in a drill array
self.slot_array_size_label = FCLabel('%s:' % _('Nr of slots'))
@@ -219,8 +255,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.slot_array_size_entry = FCSpinner()
self.slot_array_size_entry.set_range(0, 999999)
- grid0.addWidget(self.slot_array_size_label, 15, 0)
- grid0.addWidget(self.slot_array_size_entry, 15, 1)
+ slot_array_grid.addWidget(self.slot_array_size_label, 0, 0)
+ slot_array_grid.addWidget(self.slot_array_size_entry, 0, 1)
# Linear Slot Array direction
self.slot_array_axis_label = FCLabel('%s:' % _('Linear Direction'))
@@ -233,10 +269,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
# self.slot_axis_label.setMinimumWidth(100)
self.slot_array_axis_radio = RadioSet([{'label': _('X'), 'value': 'X'},
{'label': _('Y'), 'value': 'Y'},
- {'label': _('Angle'), 'value': 'A'}])
+ {'label': _('Angle'), 'value': 'A'}], compact=True)
- grid0.addWidget(self.slot_array_axis_label, 16, 0)
- grid0.addWidget(self.slot_array_axis_radio, 16, 1)
+ slot_array_grid.addWidget(self.slot_array_axis_label, 2, 0)
+ slot_array_grid.addWidget(self.slot_array_axis_radio, 2, 1)
# Linear Slot Array pitch distance
self.slot_array_pitch_label = FCLabel('%s:' % _('Pitch'))
@@ -250,8 +286,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.slot_array_pitch_entry.setRange(0, 999999)
self.slot_array_pitch_entry.setSingleStep(1)
- grid0.addWidget(self.slot_array_pitch_label, 17, 0)
- grid0.addWidget(self.slot_array_pitch_entry, 17, 1)
+ slot_array_grid.addWidget(self.slot_array_pitch_label, 4, 0)
+ slot_array_grid.addWidget(self.slot_array_pitch_entry, 4, 1)
# Linear Slot Array custom angle
self.slot_array_angle_label = FCLabel('%s:' % _('Angle'))
@@ -264,11 +300,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.slot_array_angle_entry.setRange(-360, 360)
self.slot_array_angle_entry.setSingleStep(5)
- grid0.addWidget(self.slot_array_angle_label, 18, 0)
- grid0.addWidget(self.slot_array_angle_entry, 18, 1)
+ slot_array_grid.addWidget(self.slot_array_angle_label, 6, 0)
+ slot_array_grid.addWidget(self.slot_array_angle_entry, 6, 1)
- self.slot_array_circ_label = FCLabel('%s:' % _('Circular Slot Array'))
- grid0.addWidget(self.slot_array_circ_label, 19, 0, 1, 2)
+ # #############################################################################################################
+ # Circular Slot Array Frame
+ # #############################################################################################################
+ self.slot_array_circ_label = FCLabel('%s' % _('Circular Slot Array'))
+ self.layout.addWidget(self.slot_array_circ_label)
+
+ circ_slot_frame = FCFrame()
+ self.layout.addWidget(circ_slot_frame)
+
+ circ_slot_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ circ_slot_frame.setLayout(circ_slot_grid)
# Circular Slot Array direction
self.slot_array_circular_direction_label = FCLabel('%s:' % _('Circular Direction'))
@@ -278,10 +323,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
)
self.slot_array_circular_dir_radio = RadioSet([{'label': _('CW'), 'value': 'CW'},
- {'label': _('CCW'), 'value': 'CCW'}])
+ {'label': _('CCW'), 'value': 'CCW'}], compact=True)
- grid0.addWidget(self.slot_array_circular_direction_label, 20, 0)
- grid0.addWidget(self.slot_array_circular_dir_radio, 20, 1)
+ circ_slot_grid.addWidget(self.slot_array_circular_direction_label, 0, 0)
+ circ_slot_grid.addWidget(self.slot_array_circular_dir_radio, 0, 1)
# Circular Slot Array Angle
self.slot_array_circular_angle_label = FCLabel('%s:' % _('Circular Angle'))
@@ -294,7 +339,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
self.slot_array_circular_angle_entry.setRange(-360, 360)
self.slot_array_circular_angle_entry.setSingleStep(5)
- grid0.addWidget(self.slot_array_circular_angle_label, 21, 0)
- grid0.addWidget(self.slot_array_circular_angle_entry, 21, 1)
+ circ_slot_grid.addWidget(self.slot_array_circular_angle_label, 2, 0)
+ circ_slot_grid.addWidget(self.slot_array_circular_angle_entry, 2, 1)
+
+ FCGridLayout.set_common_column_size(
+ [param_grid, lin_grid, circ_grid, slots_grid, slot_array_grid, circ_slot_grid], 0)
self.layout.addStretch()
diff --git a/appGUI/preferences/excellon/ExcellonExpPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonExpPrefGroupUI.py
index e6b08097..8b1b486a 100644
--- a/appGUI/preferences/excellon/ExcellonExpPrefGroupUI.py
+++ b/appGUI/preferences/excellon/ExcellonExpPrefGroupUI.py
@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets, QtCore
-from appGUI.GUIElements import RadioSet, FCSpinner, FCLabel, FCGridLayout
+from appGUI.GUIElements import RadioSet, FCSpinner, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
@@ -20,16 +20,21 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # Plot options
- self.export_options_label = FCLabel("%s:" % _("Export Options"))
+ # #############################################################################################################
+ # Export Frame
+ # #############################################################################################################
+ self.export_options_label = FCLabel('%s' % _("Export Options"))
self.export_options_label.setToolTip(
_("The parameters set here are used in the file exported\n"
"when using the File -> Export -> Export Excellon menu entry.")
)
self.layout.addWidget(self.export_options_label)
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
+ exp_frame = FCFrame()
+ self.layout.addWidget(exp_frame)
+
+ exp_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ exp_frame.setLayout(exp_grid)
# Excellon Units
self.excellon_units_label = FCLabel('%s:' % _('Units'))
@@ -43,8 +48,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
_("The units used in the Excellon file.")
)
- grid0.addWidget(self.excellon_units_label, 0, 0)
- grid0.addWidget(self.excellon_units_radio, 0, 1)
+ exp_grid.addWidget(self.excellon_units_label, 0, 0)
+ exp_grid.addWidget(self.excellon_units_radio, 0, 1)
# Excellon non-decimal format
self.digits_label = FCLabel("%s:" % _("Int/Decimals"))
@@ -80,8 +85,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
hlay1.addWidget(self.format_dec_entry, QtCore.Qt.AlignmentFlag.AlignLeft)
hlay1.addStretch()
- grid0.addWidget(self.digits_label, 2, 0)
- grid0.addLayout(hlay1, 2, 1)
+ exp_grid.addWidget(self.digits_label, 2, 0)
+ exp_grid.addLayout(hlay1, 2, 1)
# Select the Excellon Format
self.format_label = FCLabel("%s:" % _("Format"))
@@ -104,8 +109,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
"or TZ = trailing zeros are kept.")
)
- grid0.addWidget(self.format_label, 4, 0)
- grid0.addWidget(self.format_radio, 4, 1)
+ exp_grid.addWidget(self.format_label, 4, 0)
+ exp_grid.addWidget(self.format_radio, 4, 1)
# Excellon Zeros
self.zeros_label = FCLabel('%s:' % _('Zeros'))
@@ -128,8 +133,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
"and Leading Zeros are removed.")
)
- grid0.addWidget(self.zeros_label, 6, 0)
- grid0.addWidget(self.zeros_radio, 6, 1)
+ exp_grid.addWidget(self.zeros_label, 6, 0)
+ exp_grid.addWidget(self.zeros_radio, 6, 1)
# Slot type
self.slot_type_label = FCLabel('%s:' % _('Slot type'))
@@ -152,8 +157,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
"using the Drilled slot command (G85).")
)
- grid0.addWidget(self.slot_type_label, 8, 0)
- grid0.addWidget(self.slot_type_radio, 8, 1)
+ exp_grid.addWidget(self.slot_type_label, 8, 0)
+ exp_grid.addWidget(self.slot_type_radio, 8, 1)
self.layout.addStretch(1)
diff --git a/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py
index c6917a40..a9434502 100644
--- a/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py
+++ b/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py
@@ -2,7 +2,8 @@ import platform
from PyQt6 import QtWidgets, QtCore
-from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCSliderWithSpinner, FCColorEntry, FCLabel, FCGridLayout
+from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCSliderWithSpinner, FCColorEntry, FCLabel, \
+ FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
@@ -23,44 +24,48 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # Plot options
- self.plot_options_label = FCLabel("%s:" % _("Plot Options"))
+ # #############################################################################################################
+ # Plot Frame
+ # #############################################################################################################
+ self.plot_options_label = FCLabel('%s' % _("Plot Options"))
self.layout.addWidget(self.plot_options_label)
- grid1 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid1)
+ plot_frame = FCFrame()
+ self.layout.addWidget(plot_frame)
+
+ plot_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ plot_frame.setLayout(plot_grid)
# Plot CB
self.plot_cb = FCCheckBox(label=_('Plot'))
self.plot_cb.setToolTip(
"Plot (show) this object."
)
- grid1.addWidget(self.plot_cb, 0, 0)
+ plot_grid.addWidget(self.plot_cb, 0, 0)
# Solid CB
self.solid_cb = FCCheckBox(label=_('Solid'))
self.solid_cb.setToolTip(
"Plot as solid circles."
)
- grid1.addWidget(self.solid_cb, 0, 1)
+ plot_grid.addWidget(self.solid_cb, 0, 1)
# Multicolored CB
self.multicolored_cb = FCCheckBox(label='%s' % _('M-Color'))
self.multicolored_cb.setToolTip(
_("Draw polygons in different colors.")
)
- grid1.addWidget(self.multicolored_cb, 0, 2)
+ plot_grid.addWidget(self.multicolored_cb, 0, 2)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid1.addWidget(separator_line, 1, 0, 1, 3)
+ # separator_line = QtWidgets.QFrame()
+ # separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
+ # separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
+ # plot_grid.addWidget(separator_line, 1, 0, 1, 3)
- grid2 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid2)
-
- # Excellon format
- self.excellon_format_label = FCLabel("%s:" % _("Excellon Format"))
+ # #############################################################################################################
+ # Excellon Format Frame
+ # #############################################################################################################
+ self.excellon_format_label = FCLabel('%s' % _("Excellon Format"))
self.excellon_format_label.setToolTip(
_("The NC drill files, usually named Excellon files\n"
"are files that can be found in different formats.\n"
@@ -83,7 +88,13 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
"\n"
"KiCAD 3:5 INCH TZ")
)
- grid2.addWidget(self.excellon_format_label, 0, 0, 1, 2)
+ self.layout.addWidget(self.excellon_format_label)
+
+ format_frame = FCFrame()
+ self.layout.addWidget(format_frame)
+
+ format_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ format_frame.setLayout(format_grid)
self.excellon_format_in_label = FCLabel('%s:' % _("INCH"))
self.excellon_format_in_label.setToolTip(_("Default values for INCH are 2:4"))
@@ -98,7 +109,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
)
hlay1.addWidget(self.excellon_format_upper_in_entry)
- excellon_separator_in_label = FCLabel(':')
+ excellon_separator_in_label = FCLabel(' : ')
excellon_separator_in_label.setFixedWidth(5)
hlay1.addWidget(excellon_separator_in_label)
@@ -111,8 +122,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
)
hlay1.addWidget(self.excellon_format_lower_in_entry)
- grid2.addWidget(self.excellon_format_in_label, 1, 0)
- grid2.addLayout(hlay1, 1, 1)
+ format_grid.addWidget(self.excellon_format_in_label, 1, 0)
+ format_grid.addLayout(hlay1, 1, 1)
self.excellon_format_mm_label = FCLabel('%s:' % _("METRIC"))
self.excellon_format_mm_label.setToolTip(_("Default values for METRIC are 3:3"))
@@ -127,7 +138,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
)
hlay2.addWidget(self.excellon_format_upper_mm_entry)
- excellon_separator_mm_label = FCLabel(':')
+ excellon_separator_mm_label = FCLabel(' : ')
excellon_separator_mm_label.setFixedWidth(5)
hlay2.addWidget(excellon_separator_mm_label, QtCore.Qt.AlignmentFlag.AlignLeft)
@@ -140,8 +151,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
)
hlay2.addWidget(self.excellon_format_lower_mm_entry)
- grid2.addWidget(self.excellon_format_mm_label, 2, 0)
- grid2.addLayout(hlay2, 2, 1)
+ format_grid.addWidget(self.excellon_format_mm_label, 2, 0)
+ format_grid.addLayout(hlay2, 2, 1)
self.excellon_zeros_label = FCLabel('%s:' % _('Zeros'))
self.excellon_zeros_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft)
@@ -154,12 +165,12 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
"This is used when there is no information\n"
"stored in the Excellon file.")
)
- grid2.addWidget(self.excellon_zeros_label, 3, 0)
+ format_grid.addWidget(self.excellon_zeros_label, 3, 0)
self.excellon_zeros_radio = RadioSet([{'label': _('LZ'), 'value': 'L'},
{'label': _('TZ'), 'value': 'T'}])
- grid2.addWidget(self.excellon_zeros_radio, 3, 1)
+ format_grid.addWidget(self.excellon_zeros_radio, 3, 1)
self.excellon_units_label = FCLabel('%s:' % _('Units'))
self.excellon_units_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft)
@@ -179,28 +190,32 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
"therefore this parameter will be used.")
)
- grid2.addWidget(self.excellon_units_label, 4, 0)
- grid2.addWidget(self.excellon_units_radio, 4, 1)
+ format_grid.addWidget(self.excellon_units_label, 4, 0)
+ format_grid.addWidget(self.excellon_units_radio, 4, 1)
self.update_excellon_cb = FCCheckBox(label=_('Update Export settings'))
self.update_excellon_cb.setToolTip(
"If checked, the Excellon Export settings will be updated with the ones above."
)
- grid2.addWidget(self.update_excellon_cb, 5, 0, 1, 2)
+ format_grid.addWidget(self.update_excellon_cb, 5, 0, 1, 2)
# Adding the Excellon Format Defaults Button
self.excellon_defaults_button = QtWidgets.QPushButton()
self.excellon_defaults_button.setText(str(_("Restore Defaults")))
self.excellon_defaults_button.setMinimumWidth(80)
- grid2.addWidget(self.excellon_defaults_button, 6, 0, 1, 2)
+ format_grid.addWidget(self.excellon_defaults_button, 6, 0, 1, 2)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid2.addWidget(separator_line, 7, 0, 1, 2)
+ # #############################################################################################################
+ # Optimization Frame
+ # #############################################################################################################
+ self.excellon_general_label = FCLabel('%s' % _("Path Optimization"))
+ self.layout.addWidget(self.excellon_general_label)
- self.excellon_general_label = FCLabel("%s:" % _("Path Optimization"))
- grid2.addWidget(self.excellon_general_label, 8, 0, 1, 2)
+ opt_frame = FCFrame()
+ self.layout.addWidget(opt_frame)
+
+ opt_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ opt_frame.setLayout(opt_grid)
self.excellon_optimization_label = FCLabel(_('Algorithm:'))
self.excellon_optimization_label.setToolTip(
@@ -219,8 +234,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
{'label': _('TSA'), 'value': 'T'}],
orientation='vertical', compact=True)
- grid2.addWidget(self.excellon_optimization_label, 9, 0)
- grid2.addWidget(self.excellon_optimization_radio, 9, 1)
+ opt_grid.addWidget(self.excellon_optimization_label, 0, 0)
+ opt_grid.addWidget(self.excellon_optimization_radio, 0, 1)
self.optimization_time_label = FCLabel('%s:' % _('Duration'))
self.optimization_time_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft)
@@ -235,33 +250,40 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
self.optimization_time_entry = FCSpinner()
self.optimization_time_entry.set_range(0, 999)
- grid2.addWidget(self.optimization_time_label, 10, 0)
- grid2.addWidget(self.optimization_time_entry, 10, 1)
-
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid2.addWidget(separator_line, 11, 0, 1, 2)
+ opt_grid.addWidget(self.optimization_time_label, 2, 0)
+ opt_grid.addWidget(self.optimization_time_entry, 2, 1)
+ # #############################################################################################################
+ # Fusing Frame
+ # #############################################################################################################
# Fuse Tools
- self.join_geo_label = FCLabel('%s:' % _('Join Option'))
- grid2.addWidget(self.join_geo_label, 12, 0, 1, 2)
+ self.join_geo_label = FCLabel('%s' % _('Join Option'))
+ self.layout.addWidget(self.join_geo_label)
+
+ fuse_frame = FCFrame()
+ self.layout.addWidget(fuse_frame)
+
+ fuse_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ fuse_frame.setLayout(fuse_grid)
self.fuse_tools_cb = FCCheckBox(_("Fuse Tools"))
self.fuse_tools_cb.setToolTip(
_("When checked, the tools will be merged\n"
"but only if they share some of their attributes.")
)
- grid2.addWidget(self.fuse_tools_cb, 13, 0, 1, 2)
+ fuse_grid.addWidget(self.fuse_tools_cb, 0, 0, 1, 2)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid2.addWidget(separator_line, 14, 0, 1, 2)
+ # #############################################################################################################
+ # Object Color Frame
+ # #############################################################################################################
+ self.gerber_color_label = FCLabel('%s' % _('Object Color'))
+ self.layout.addWidget(self.gerber_color_label)
- # Excellon Object Color
- self.gerber_color_label = FCLabel('%s' % _('Object Color'))
- grid2.addWidget(self.gerber_color_label, 17, 0, 1, 2)
+ obj_frame = FCFrame()
+ self.layout.addWidget(obj_frame)
+
+ obj_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ obj_frame.setLayout(obj_grid)
# Plot Line Color
self.line_color_label = FCLabel('%s:' % _('Outline'))
@@ -270,8 +292,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
)
self.line_color_entry = FCColorEntry()
- grid2.addWidget(self.line_color_label, 19, 0)
- grid2.addWidget(self.line_color_entry, 19, 1)
+ obj_grid.addWidget(self.line_color_label, 0, 0)
+ obj_grid.addWidget(self.line_color_entry, 0, 1)
# Plot Fill Color
self.fill_color_label = FCLabel('%s:' % _('Fill'))
@@ -282,8 +304,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
)
self.fill_color_entry = FCColorEntry()
- grid2.addWidget(self.fill_color_label, 22, 0)
- grid2.addWidget(self.fill_color_entry, 22, 1)
+ obj_grid.addWidget(self.fill_color_label, 2, 0)
+ obj_grid.addWidget(self.fill_color_entry, 2, 1)
# Plot Fill Transparency Level
self.excellon_alpha_label = FCLabel('%s:' % _('Alpha'))
@@ -292,8 +314,10 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
)
self.excellon_alpha_entry = FCSliderWithSpinner(0, 255, 1)
- grid2.addWidget(self.excellon_alpha_label, 24, 0)
- grid2.addWidget(self.excellon_alpha_entry, 24, 1)
+ obj_grid.addWidget(self.excellon_alpha_label, 4, 0)
+ obj_grid.addWidget(self.excellon_alpha_entry, 4, 1)
+
+ FCGridLayout.set_common_column_size([plot_grid, format_grid, opt_grid, obj_grid, fuse_grid], 0)
self.layout.addStretch()
diff --git a/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py
index 2bd215de..87b4060b 100644
--- a/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py
+++ b/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py
@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
-from appGUI.GUIElements import FCDoubleSpinner, FCLabel, FCGridLayout
+from appGUI.GUIElements import FCDoubleSpinner, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
@@ -21,23 +21,28 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # ## Create CNC Job
- self.cncjob_label = FCLabel('%s' % _('Parameters'))
+ # #############################################################################################################
+ # PARAMETERS Frame
+ # #############################################################################################################
+ self.cncjob_label = FCLabel('%s' % _('Parameters'))
self.cncjob_label.setToolTip(
_("Parameters used to create a CNC Job object\n"
"for this drill object.")
)
self.layout.addWidget(self.cncjob_label)
- grid2 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid2)
+ param_frame = FCFrame()
+ self.layout.addWidget(param_frame)
+
+ param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ param_frame.setLayout(param_grid)
# ### Milling Holes ## ##
self.mill_hole_label = FCLabel('%s' % _('Mill Holes'))
self.mill_hole_label.setToolTip(
_("Create Geometry for milling holes.")
)
- grid2.addWidget(self.mill_hole_label, 16, 0, 1, 2)
+ param_grid.addWidget(self.mill_hole_label, 0, 0, 1, 2)
tdlabel = FCLabel('%s:' % _('Drill Tool dia'))
tdlabel.setToolTip(
@@ -48,8 +53,8 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI):
self.tooldia_entry.set_precision(self.decimals)
self.tooldia_entry.set_range(0, 999.9999)
- grid2.addWidget(tdlabel, 18, 0)
- grid2.addWidget(self.tooldia_entry, 18, 1)
+ param_grid.addWidget(tdlabel, 2, 0)
+ param_grid.addWidget(self.tooldia_entry, 2, 1)
stdlabel = FCLabel('%s:' % _('Slot Tool dia'))
stdlabel.setToolTip(
@@ -60,7 +65,7 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI):
self.slot_tooldia_entry.set_precision(self.decimals)
self.slot_tooldia_entry.set_range(0, 999.9999)
- grid2.addWidget(stdlabel, 21, 0)
- grid2.addWidget(self.slot_tooldia_entry, 21, 1)
+ param_grid.addWidget(stdlabel, 4, 0)
+ param_grid.addWidget(self.slot_tooldia_entry, 4, 1)
- self.layout.addStretch()
+ # self.layout.addStretch()
diff --git a/appGUI/preferences/geometry/GeometryAdvOptPrefGroupUI.py b/appGUI/preferences/geometry/GeometryAdvOptPrefGroupUI.py
index 5823e255..1200aa11 100644
--- a/appGUI/preferences/geometry/GeometryAdvOptPrefGroupUI.py
+++ b/appGUI/preferences/geometry/GeometryAdvOptPrefGroupUI.py
@@ -1,7 +1,6 @@
from PyQt6 import QtWidgets
-from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCLabel, NumericalEvalTupleEntry, \
- NumericalEvalEntry, FCComboBox2, FCGridLayout
+from appGUI.GUIElements import FCDoubleSpinner, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -22,10 +21,10 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # ------------------------------
- # ## Advanced Options
- # ------------------------------
- self.geo_label = FCLabel('%s:' % _('Advanced Options'))
+ # #############################################################################################################
+ # Advanced Options Frame
+ # #############################################################################################################
+ self.geo_label = FCLabel('%s' % _('Advanced Options'))
self.geo_label.setToolTip(
_("A list of advanced parameters.\n"
"Those parameters are available only for\n"
@@ -33,8 +32,11 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.geo_label)
- grid1 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid1)
+ adv_frame = FCFrame()
+ self.layout.addWidget(adv_frame)
+
+ adv_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ adv_frame.setLayout(adv_grid)
# Size of trace segment on X axis
segx_label = FCLabel('%s:' % _("Segment X size"))
@@ -49,8 +51,8 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
self.segx_entry.setSingleStep(0.1)
self.segx_entry.setWrapping(True)
- grid1.addWidget(segx_label, 0, 0)
- grid1.addWidget(self.segx_entry, 0, 1)
+ adv_grid.addWidget(segx_label, 0, 0)
+ adv_grid.addWidget(self.segx_entry, 0, 1)
# Size of trace segment on Y axis
segy_label = FCLabel('%s:' % _("Segment Y size"))
@@ -65,8 +67,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
self.segy_entry.setSingleStep(0.1)
self.segy_entry.setWrapping(True)
- grid1.addWidget(segy_label, 2, 0)
- grid1.addWidget(self.segy_entry, 2, 1)
+ adv_grid.addWidget(segy_label, 2, 0)
+ adv_grid.addWidget(self.segy_entry, 2, 1)
-
- self.layout.addStretch()
+ # self.layout.addStretch()
diff --git a/appGUI/preferences/geometry/GeometryEditorPrefGroupUI.py b/appGUI/preferences/geometry/GeometryEditorPrefGroupUI.py
index 84becc8a..09860ce6 100644
--- a/appGUI/preferences/geometry/GeometryEditorPrefGroupUI.py
+++ b/appGUI/preferences/geometry/GeometryEditorPrefGroupUI.py
@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
-from appGUI.GUIElements import FCSpinner, RadioSet, FCLabel, FCGridLayout
+from appGUI.GUIElements import FCSpinner, RadioSet, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -21,15 +21,20 @@ class GeometryEditorPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # Editor Parameters
- self.param_label = FCLabel("%s:" % _("Parameters"))
+ # #############################################################################################################
+ # PARAMETERS Frame
+ # #############################################################################################################
+ self.param_label = FCLabel('%s' % _("Parameters"))
self.param_label.setToolTip(
_("A list of Editor parameters.")
)
self.layout.addWidget(self.param_label)
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
+ editor_frame = FCFrame()
+ self.layout.addWidget(editor_frame)
+
+ editor_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ editor_frame.setLayout(editor_grid)
# Selection Limit
self.sel_limit_label = FCLabel('%s:' % _("Selection limit"))
@@ -43,8 +48,8 @@ class GeometryEditorPrefGroupUI(OptionsGroupUI):
self.sel_limit_entry = FCSpinner()
self.sel_limit_entry.set_range(0, 9999)
- grid0.addWidget(self.sel_limit_label, 0, 0)
- grid0.addWidget(self.sel_limit_entry, 0, 1)
+ editor_grid.addWidget(self.sel_limit_label, 0, 0)
+ editor_grid.addWidget(self.sel_limit_entry, 0, 1)
# Milling Type
milling_type_label = FCLabel('%s:' % _('Milling Type'))
@@ -54,8 +59,8 @@ class GeometryEditorPrefGroupUI(OptionsGroupUI):
"- conventional / useful when there is no backlash compensation")
)
self.milling_type_radio = RadioSet([{'label': _('Climb'), 'value': 'cl'},
- {'label': _('Conventional'), 'value': 'cv'}])
- grid0.addWidget(milling_type_label, 1, 0)
- grid0.addWidget(self.milling_type_radio, 1, 1)
+ {'label': _('Conventional'), 'value': 'cv'}], compact=True)
+ editor_grid.addWidget(milling_type_label, 2, 0)
+ editor_grid.addWidget(self.milling_type_radio, 2, 1)
self.layout.addStretch()
diff --git a/appGUI/preferences/geometry/GeometryExpPrefGroupUI.py b/appGUI/preferences/geometry/GeometryExpPrefGroupUI.py
index 891d99f7..d3d5f586 100644
--- a/appGUI/preferences/geometry/GeometryExpPrefGroupUI.py
+++ b/appGUI/preferences/geometry/GeometryExpPrefGroupUI.py
@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets, QtCore
-from appGUI.GUIElements import FCLabel, FCComboBox, FCGridLayout
+from appGUI.GUIElements import FCLabel, FCComboBox, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
@@ -20,16 +20,21 @@ class GeometryExpPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # Plot options
- self.export_options_label = FCLabel("%s:" % _("Export Options"))
+ # #############################################################################################################
+ # Export Frame
+ # #############################################################################################################
+ self.export_options_label = FCLabel('%s' % _("Export Options"))
self.export_options_label.setToolTip(
_("The parameters set here are used in the file exported\n"
"when using the File -> Export -> Export DXF menu entry.")
)
self.layout.addWidget(self.export_options_label)
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
+ export_frame = FCFrame()
+ self.layout.addWidget(export_frame)
+
+ export_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ export_frame.setLayout(export_grid)
# Excellon non-decimal format
self.dxf_format_label = FCLabel("%s:" % _("Format"))
@@ -40,5 +45,7 @@ class GeometryExpPrefGroupUI(OptionsGroupUI):
self.dxf_format_combo = FCComboBox()
self.dxf_format_combo.addItems(['R12', 'R2000', 'R2004', 'R2007', 'R2010', 'R2013', 'R2018'])
- grid0.addWidget(self.dxf_format_label, 0, 0)
- grid0.addWidget(self.dxf_format_combo, 0, 1)
+ export_grid.addWidget(self.dxf_format_label, 0, 0)
+ export_grid.addWidget(self.dxf_format_combo, 0, 1)
+
+ self.layout.addStretch()
diff --git a/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py b/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py
index b4dd1537..b68d7372 100644
--- a/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py
+++ b/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py
@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
-from appGUI.GUIElements import FCCheckBox, FCSpinner, FCEntry, FCColorEntry, RadioSet, FCLabel, FCGridLayout
+from appGUI.GUIElements import FCCheckBox, FCSpinner, FCColorEntry, RadioSet, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import platform
@@ -23,29 +23,31 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # ## Plot options
- self.plot_options_label = FCLabel("%s:" % _("Plot Options"))
+ # #############################################################################################################
+ # Plot Frame
+ # #############################################################################################################
+ self.plot_options_label = FCLabel('%s' % _("Plot Options"))
self.layout.addWidget(self.plot_options_label)
- plot_hlay = QtWidgets.QHBoxLayout()
- self.layout.addLayout(plot_hlay)
+ plot_frame = FCFrame()
+ self.layout.addWidget(plot_frame)
+
+ plot_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ plot_frame.setLayout(plot_grid)
# Plot CB
self.plot_cb = FCCheckBox(label=_('Plot'))
self.plot_cb.setToolTip(
_("Plot (show) this object.")
)
- plot_hlay.addWidget(self.plot_cb)
+ plot_grid.addWidget(self.plot_cb, 0, 0)
# Multicolored CB
self.multicolored_cb = FCCheckBox(label=_('M-Color'))
self.multicolored_cb.setToolTip(
_("Draw polygons in different colors.")
)
- plot_hlay.addWidget(self.multicolored_cb)
-
- grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid0)
+ plot_grid.addWidget(self.multicolored_cb, 0, 1)
# Number of circle steps for circular aperture linear approximation
self.circle_steps_label = FCLabel('%s:' % _("Circle Steps"))
@@ -56,16 +58,25 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
self.circle_steps_entry = FCSpinner()
self.circle_steps_entry.set_range(0, 999)
- grid0.addWidget(self.circle_steps_label, 1, 0)
- grid0.addWidget(self.circle_steps_entry, 1, 1)
+ plot_grid.addWidget(self.circle_steps_label, 2, 0)
+ plot_grid.addWidget(self.circle_steps_entry, 2, 1)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid0.addWidget(separator_line, 9, 0, 1, 2)
+ # separator_line = QtWidgets.QFrame()
+ # separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
+ # separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
+ # grid0.addWidget(separator_line, 9, 0, 1, 2)
- self.opt_label = FCLabel("%s:" % _("Path Optimization"))
- grid0.addWidget(self.opt_label, 10, 0, 1, 2)
+ # #############################################################################################################
+ # Optimization Frame
+ # #############################################################################################################
+ self.opt_label = FCLabel('%s' % _("Path Optimization"))
+ self.layout.addWidget(self.opt_label)
+
+ opt_frame = FCFrame()
+ self.layout.addWidget(opt_frame)
+
+ opt_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ opt_frame.setLayout(opt_grid)
self.opt_algorithm_label = FCLabel(_('Algorithm:'))
self.opt_algorithm_label.setToolTip(
@@ -87,8 +98,8 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
{'label': _('TSA'), 'value': 'T'}
], orientation='vertical', compact=True)
- grid0.addWidget(self.opt_algorithm_label, 12, 0)
- grid0.addWidget(self.opt_algorithm_radio, 12, 1)
+ opt_grid.addWidget(self.opt_algorithm_label, 0, 0)
+ opt_grid.addWidget(self.opt_algorithm_radio, 0, 1)
self.optimization_time_label = FCLabel('%s:' % _('Duration'))
self.optimization_time_label.setToolTip(
@@ -102,33 +113,39 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
self.optimization_time_entry = FCSpinner()
self.optimization_time_entry.set_range(0, 999)
- grid0.addWidget(self.optimization_time_label, 14, 0)
- grid0.addWidget(self.optimization_time_entry, 14, 1)
+ opt_grid.addWidget(self.optimization_time_label, 2, 0)
+ opt_grid.addWidget(self.optimization_time_entry, 2, 1)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid0.addWidget(separator_line, 16, 0, 1, 2)
+ # #############################################################################################################
+ # Fuse Frame
+ # #############################################################################################################
+ self.join_geo_label = FCLabel('%s' % _('Join Option'))
+ self.layout.addWidget(self.join_geo_label)
- # Fuse Tools
- self.join_geo_label = FCLabel('%s:' % _('Join Option'))
- grid0.addWidget(self.join_geo_label, 18, 0, 1, 2)
+ fuse_frame = FCFrame()
+ self.layout.addWidget(fuse_frame)
+
+ fuse_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ fuse_frame.setLayout(fuse_grid)
self.fuse_tools_cb = FCCheckBox(_("Fuse Tools"))
self.fuse_tools_cb.setToolTip(
_("When checked, the tools will be merged\n"
"but only if they share some of their attributes.")
)
- grid0.addWidget(self.fuse_tools_cb, 20, 0, 1, 2)
+ fuse_grid.addWidget(self.fuse_tools_cb, 0, 0, 1, 2)
- separator_line = QtWidgets.QFrame()
- separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
- separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
- grid0.addWidget(separator_line, 22, 0, 1, 2)
+ # #############################################################################################################
+ # Object Color Frame
+ # #############################################################################################################
+ self.gerber_color_label = FCLabel('%s' % _('Object Color'))
+ self.layout.addWidget(self.gerber_color_label)
- # Geometry Object Color
- self.gerber_color_label = FCLabel('%s:' % _('Object Color'))
- grid0.addWidget(self.gerber_color_label, 24, 0, 1, 2)
+ obj_frame = FCFrame()
+ self.layout.addWidget(obj_frame)
+
+ obj_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ obj_frame.setLayout(obj_grid)
# Plot Line Color
self.line_color_label = FCLabel('%s:' % _('Outline'))
@@ -137,8 +154,10 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
)
self.line_color_entry = FCColorEntry()
- grid0.addWidget(self.line_color_label, 26, 0)
- grid0.addWidget(self.line_color_entry, 26, 1)
+ obj_grid.addWidget(self.line_color_label, 0, 0)
+ obj_grid.addWidget(self.line_color_entry, 0, 1)
+
+ FCGridLayout.set_common_column_size([plot_grid, opt_grid, obj_grid, fuse_grid], 0)
self.layout.addStretch()
diff --git a/appGUI/preferences/geometry/GeometryOptPrefGroupUI.py b/appGUI/preferences/geometry/GeometryOptPrefGroupUI.py
index 8440e9ef..86036978 100644
--- a/appGUI/preferences/geometry/GeometryOptPrefGroupUI.py
+++ b/appGUI/preferences/geometry/GeometryOptPrefGroupUI.py
@@ -1,8 +1,7 @@
from PyQt6 import QtWidgets
from PyQt6.QtCore import Qt
-from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, OptionalInputSection, FCSpinner, FCComboBox, \
- NumericalEvalTupleEntry, FCLabel, FCGridLayout
+from appGUI.GUIElements import FCDoubleSpinner, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -23,19 +22,17 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
- # ------------------------------
- # ## Create CNC Job
- # ------------------------------
- self.cncjob_label = FCLabel('%s:' % _('Create CNCJob'))
- self.cncjob_label.setToolTip(
- _("Create a CNC Job object\n"
- "tracing the contours of this\n"
- "Geometry object.")
- )
+ # #############################################################################################################
+ # PARAMETERS Frame
+ # #############################################################################################################
+ self.cncjob_label = FCLabel('%s' % _("Parameters"))
self.layout.addWidget(self.cncjob_label)
- grid1 = FCGridLayout(v_spacing=5, h_spacing=3)
- self.layout.addLayout(grid1)
+ param_frame = FCFrame()
+ self.layout.addWidget(param_frame)
+
+ param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
+ param_frame.setLayout(param_grid)
# Cut Z
cutzlabel = FCLabel('%s:' % _('Cut Z'))
@@ -50,7 +47,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
self.cutz_entry.setSingleStep(0.1)
self.cutz_entry.setWrapping(True)
- grid1.addWidget(cutzlabel, 0, 0)
- grid1.addWidget(self.cutz_entry, 0, 1)
+ param_grid.addWidget(cutzlabel, 0, 0)
+ param_grid.addWidget(self.cutz_entry, 0, 1)
- self.layout.addStretch()
+ # self.layout.addStretch()
diff --git a/app_Main.py b/app_Main.py
index f00e7429..ef747968 100644
--- a/app_Main.py
+++ b/app_Main.py
@@ -884,7 +884,8 @@ class App(QtCore.QObject):
if show_splash and self.cmd_line_headless != 1:
splash_pix = QtGui.QPixmap(self.resource_location + '/splash.png')
- self.splash = QtWidgets.QSplashScreen(splash_pix, Qt.WindowType.WindowStaysOnTopHint)
+ # self.splash = QtWidgets.QSplashScreen(splash_pix, Qt.WindowType.WindowStaysOnTopHint)
+ self.splash = QtWidgets.QSplashScreen(splash_pix)
# self.splash.setMask(splash_pix.mask())
# move splashscreen to the current monitor