From 952ba0023a2b70de5fd7e5b2bb0d06566ec214e5 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Tue, 4 Jun 2024 22:27:33 +0200 Subject: Update tartan gui (#2965) * update tartan gui * params settings size * fix issue with set_precision * fix issue with linear gradient * do not add ignore layer command to png rerealistic output --- lib/tartan/palette.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'lib/tartan') diff --git a/lib/tartan/palette.py b/lib/tartan/palette.py index 2e33fbc8..d945eb83 100644 --- a/lib/tartan/palette.py +++ b/lib/tartan/palette.py @@ -59,18 +59,10 @@ class Palette: stripes = [] for stripe_sizer in outer_sizer.Children: stripe = {'render': 1, 'color': '#000000', 'width': '5'} - stripe_info = stripe_sizer.GetSizer() - for color in stripe_info.GetChildren(): - widget = color.GetWindow() - if isinstance(widget, wx.CheckBox): - # in embroidery it is ok to have gaps between the stripes - stripe['render'] = widget.Get3StateValue() - elif isinstance(widget, wx.ColourPickerCtrl): - stripe['color'] = widget.GetColour().GetAsString(wx.C2S_HTML_SYNTAX) - elif isinstance(widget, wx.SpinCtrlDouble): - stripe['width'] = widget.GetValue() - elif isinstance(widget, wx.Button) or isinstance(widget, wx.StaticText): - continue + stripe_panel = stripe_sizer.GetWindow() + stripe['render'] = stripe_panel.visibility.Get3StateValue() + stripe['color'] = stripe_panel.colorpicker.GetColour().GetAsString(wx.C2S_HTML_SYNTAX) + stripe['width'] = stripe_panel.stripe_width.GetValue() stripes.append(stripe) self.palette_stripes[i] = stripes if self.equal_warp_weft: -- cgit v1.2.3