- added a Multi-color checkbox for the Excellon UI (this way colors for each tool are easier to differentiate especially when the diameter is close)
This commit is contained in:
@@ -480,22 +480,38 @@ class ExcellonObjectUI(ObjectUI):
|
||||
parent=parent,
|
||||
app=self.app)
|
||||
|
||||
# ### Plot options ####
|
||||
hlay_plot = QtWidgets.QHBoxLayout()
|
||||
self.custom_box.addLayout(hlay_plot)
|
||||
# Plot options
|
||||
grid_h = QtWidgets.QGridLayout()
|
||||
grid_h.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
self.custom_box.addLayout(grid_h)
|
||||
grid_h.setColumnStretch(0, 0)
|
||||
grid_h.setColumnStretch(1, 1)
|
||||
|
||||
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
self.plot_options_label.setMinimumWidth(90)
|
||||
|
||||
grid_h.addWidget(self.plot_options_label, 0, 0)
|
||||
|
||||
# Solid CB
|
||||
self.solid_cb = FCCheckBox(label=_('Solid'))
|
||||
self.solid_cb.setToolTip(
|
||||
_("Solid circles.")
|
||||
)
|
||||
hlay_plot.addWidget(self.plot_options_label)
|
||||
hlay_plot.addStretch()
|
||||
hlay_plot.addWidget(self.solid_cb)
|
||||
self.solid_cb.setMinimumWidth(50)
|
||||
grid_h.addWidget(self.solid_cb, 0, 1)
|
||||
|
||||
# Multicolored CB
|
||||
self.multicolored_cb = FCCheckBox(label=_('Multi-Color'))
|
||||
self.multicolored_cb.setToolTip(
|
||||
_("Draw polygons in different colors.")
|
||||
)
|
||||
self.multicolored_cb.setMinimumWidth(55)
|
||||
grid_h.addWidget(self.multicolored_cb, 0, 2)
|
||||
|
||||
# ## Object name
|
||||
self.name_hlay = QtWidgets.QHBoxLayout()
|
||||
self.custom_box.addLayout(self.name_hlay)
|
||||
grid_h.addLayout(self.name_hlay, 1, 0, 1, 3)
|
||||
|
||||
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
|
||||
self.name_entry = FCEntry()
|
||||
self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||
|
||||
@@ -168,6 +168,7 @@ class PreferencesUIManager:
|
||||
# Excellon General
|
||||
"excellon_plot": self.ui.excellon_defaults_form.excellon_gen_group.plot_cb,
|
||||
"excellon_solid": self.ui.excellon_defaults_form.excellon_gen_group.solid_cb,
|
||||
"excellon_multicolored": self.ui.excellon_defaults_form.excellon_gen_group.multicolored_cb,
|
||||
"excellon_format_upper_in":
|
||||
self.ui.excellon_defaults_form.excellon_gen_group.excellon_format_upper_in_entry,
|
||||
"excellon_format_lower_in":
|
||||
|
||||
@@ -36,22 +36,31 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
grid1 = QtWidgets.QGridLayout()
|
||||
self.layout.addLayout(grid1)
|
||||
|
||||
# Plot CB
|
||||
self.plot_cb = FCCheckBox(label=_('Plot'))
|
||||
self.plot_cb.setToolTip(
|
||||
"Plot (show) this object."
|
||||
)
|
||||
grid1.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)
|
||||
|
||||
# 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)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid1.addWidget(separator_line, 1, 0, 1, 2)
|
||||
grid1.addWidget(separator_line, 1, 0, 1, 3)
|
||||
|
||||
grid2 = QtWidgets.QGridLayout()
|
||||
self.layout.addLayout(grid2)
|
||||
|
||||
@@ -31,7 +31,7 @@ class ExcellonPreferencesUI(QtWidgets.QWidget):
|
||||
self.decimals = decimals
|
||||
|
||||
self.excellon_gen_group = ExcellonGenPrefGroupUI(decimals=self.decimals)
|
||||
self.excellon_gen_group.setMinimumWidth(220)
|
||||
self.excellon_gen_group.setMinimumWidth(240)
|
||||
self.excellon_opt_group = ExcellonOptPrefGroupUI(decimals=self.decimals)
|
||||
self.excellon_opt_group.setMinimumWidth(290)
|
||||
self.excellon_exp_group = ExcellonExpPrefGroupUI(decimals=self.decimals)
|
||||
|
||||
Reference in New Issue
Block a user