- in Preferences, more Plugins preferences UI is upgraded to the new look

- In Paint Plugin fixed the Area select mode to work with Geometry object created by the Geometry Editor
- in Paint Plugin some changes in the way the source object is autoloaded
- in Paint, NCC and Cutout Plugins when using a mode that require to be terminated (by mouse RMB or ESC key) the notebook UI element is disabled until this is done
This commit is contained in:
Marius Stanciu
2021-10-02 18:02:27 +03:00
committed by Marius
parent a1530963f5
commit bc2f31aa90
13 changed files with 380 additions and 283 deletions

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -21,17 +21,21 @@ class Tools2InvertPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
self.defaults = defaults
# ## Subtractor Tool Parameters
self.sublabel = FCLabel("<b>%s:</b>" % _("Parameters"))
# #############################################################################################################
# PARAMETERS Frame
# #############################################################################################################
self.sublabel = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.sublabel.setToolTip(
_("A tool to invert Gerber geometry from positive to negative\n"
"and in revers.")
)
self.layout.addWidget(self.sublabel)
# Grid Layout
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)
# Margin
self.margin_label = FCLabel('%s:' % _('Margin'))
@@ -44,10 +48,13 @@ class Tools2InvertPrefGroupUI(OptionsGroupUI):
self.margin_entry.set_range(0.0000, 10000.0000)
self.margin_entry.setObjectName(_("Margin"))
grid0.addWidget(self.margin_label, 2, 0, 1, 2)
grid0.addWidget(self.margin_entry, 3, 0, 1, 2)
param_grid.addWidget(self.margin_label, 0, 0)
param_grid.addWidget(self.margin_entry, 0, 1)
self.join_label = FCLabel('%s:' % _("Lines Join Style"))
# #############################################################################################################
# Line Join Frame
# #############################################################################################################
self.join_label = FCLabel('<span style="color:tomato;"><b>%s</b></span>' % _("Lines Join Style"))
self.join_label.setToolTip(
_("The way that the lines in the object outline will be joined.\n"
"Can be:\n"
@@ -55,13 +62,25 @@ class Tools2InvertPrefGroupUI(OptionsGroupUI):
"- square -> the lines meet in 90 degrees angle\n"
"- bevel -> the lines are joined by a third line")
)
self.layout.addWidget(self.join_label)
join_frame = FCFrame()
self.layout.addWidget(join_frame)
join_grid = FCGridLayout(v_spacing=5, h_spacing=3)
join_frame.setLayout(join_grid)
line_join_lbl = FCLabel('%s:' % _("Value"))
self.join_radio = RadioSet([
{'label': _('Rounded'), 'value': 'r'},
{'label': _('Square'), 'value': 's'},
{'label': _('Bevel'), 'value': 'b'}
], orientation='vertical', compact=True)
], orientation='vertical')
grid0.addWidget(self.join_label, 5, 0, 1, 2)
grid0.addWidget(self.join_radio, 7, 0, 1, 2)
join_grid.addWidget(line_join_lbl, 0, 0)
join_grid.addWidget(self.join_radio, 0, 1)
FCGridLayout.set_common_column_size([param_grid, join_grid], 0)
self.layout.addStretch()