From a1440903cb91f3effd7cd23a395dbe3f8f9bed00 Mon Sep 17 00:00:00 2001 From: Momo Date: Mon, 20 Aug 2018 18:28:52 +0200 Subject: update slider maxValue when params have changed --- lib/extensions/params.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index c464e044..ce06cf2c 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -287,7 +287,6 @@ class ParamsTab(ScrolledPanel): summary_box = wx.StaticBox(self, wx.ID_ANY, label=_("Inkscape objects")) sizer = wx.StaticBoxSizer(summary_box, wx.HORIZONTAL) -# sizer = wx.BoxSizer(wx.HORIZONTAL) self.description = wx.StaticText(self) self.update_description() self.description.SetLabel(self.description_text) @@ -423,6 +422,12 @@ class SettingsFrame(wx.Frame): if self.simulate_window: self.simulate_window.stop() self.simulate_window.load(stitch_plan=stitch_plan) + + children = self.simulate_window.GetChildren() + for child in children: + if isinstance(child, wx.Slider): + child.Destroy() + self.simulate_window.set_slider() else: params_rect = self.GetScreenRect() simulator_pos = params_rect.GetTopRight() -- cgit v1.2.3 From 505388a9c1f16f351e353061e0588543fd96c824 Mon Sep 17 00:00:00 2001 From: Momo Date: Wed, 22 Aug 2018 19:24:53 +0200 Subject: fix jumping timeline and remove symbols --- lib/extensions/params.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index ce06cf2c..4b21d1dc 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -428,6 +428,9 @@ class SettingsFrame(wx.Frame): if isinstance(child, wx.Slider): child.Destroy() self.simulate_window.set_slider() + + self.simulate_window.Layout() + self.simulate_window.Refresh() else: params_rect = self.GetScreenRect() simulator_pos = params_rect.GetTopRight() -- cgit v1.2.3 From 56e153e87187a6bdad99faebc43253dfc40d4588 Mon Sep 17 00:00:00 2001 From: Momo Date: Thu, 23 Aug 2018 12:48:41 +0200 Subject: merge forward/backward/speed --- lib/extensions/params.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index 4b21d1dc..a77c96f1 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -422,6 +422,7 @@ class SettingsFrame(wx.Frame): if self.simulate_window: self.simulate_window.stop() self.simulate_window.load(stitch_plan=stitch_plan) + self.simulate_window.calculate_dimensions() children = self.simulate_window.GetChildren() for child in children: -- cgit v1.2.3 From c5bd1878846c17309c99ad7554d4645088de9629 Mon Sep 17 00:00:00 2001 From: Momo Date: Sat, 25 Aug 2018 10:57:17 +0200 Subject: * seperated controls * one frame movements --- lib/extensions/params.py | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index a77c96f1..6d1464a3 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -431,7 +431,6 @@ class SettingsFrame(wx.Frame): self.simulate_window.set_slider() self.simulate_window.Layout() - self.simulate_window.Refresh() else: params_rect = self.GetScreenRect() simulator_pos = params_rect.GetTopRight() -- cgit v1.2.3 From a355af287484a62a021808b4ced20c4b85877759 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sun, 26 Aug 2018 15:02:51 -0400 Subject: handle window size and target duration --- lib/extensions/params.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index 6d1464a3..9bde2a66 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -440,19 +440,16 @@ class SettingsFrame(wx.Frame): display = wx.Display(current_screen) screen_rect = display.GetClientArea() - max_width = screen_rect.GetWidth() - params_rect.GetWidth() - max_height = screen_rect.GetHeight() + width = screen_rect.GetWidth() - params_rect.GetWidth() + height = screen_rect.GetHeight() try: self.simulate_window = EmbroiderySimulator(None, -1, _("Preview"), simulator_pos, - size=(300, 300), - x_position=simulator_pos.x, + size=(width, height), stitch_plan=stitch_plan, on_close=self.simulate_window_closed, - target_duration=5, - max_width=max_width, - max_height=max_height) + target_duration=5) except: error = traceback.format_exc() -- cgit v1.2.3 From e854df43073ce3158654b0db304edd0bba7a7d6d Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sun, 26 Aug 2018 15:34:13 -0400 Subject: handle auto-refresh from Params --- lib/extensions/params.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index 9bde2a66..73ce069d 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -421,16 +421,7 @@ class SettingsFrame(wx.Frame): stitch_plan = patches_to_stitch_plan(patches) if self.simulate_window: self.simulate_window.stop() - self.simulate_window.load(stitch_plan=stitch_plan) - self.simulate_window.calculate_dimensions() - - children = self.simulate_window.GetChildren() - for child in children: - if isinstance(child, wx.Slider): - child.Destroy() - self.simulate_window.set_slider() - - self.simulate_window.Layout() + self.simulate_window.load(stitch_plan) else: params_rect = self.GetScreenRect() simulator_pos = params_rect.GetTopRight() -- cgit v1.2.3 From 8d196ace7fb01d2ac011d1c685ff422ef891320c Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Aug 2018 16:43:23 -0400 Subject: position params's simulator window at the top of the screen --- lib/extensions/params.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index 73ce069d..c9c994c9 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -430,6 +430,7 @@ class SettingsFrame(wx.Frame): current_screen = wx.Display.GetFromPoint(wx.GetMousePosition()) display = wx.Display(current_screen) screen_rect = display.GetClientArea() + simulator_pos.y = screen_rect.GetTop() width = screen_rect.GetWidth() - params_rect.GetWidth() height = screen_rect.GetHeight() -- cgit v1.2.3