From bb20ee88096236097baff770fb868f0500e439a1 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 5 Jan 2021 16:15:10 -0800 Subject: [PATCH] Fix sizer flags for joystick demo --- CHANGES.rst | 2 +- demo/Joystick.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9e39258b..4482decc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -24,7 +24,7 @@ New and improved in this release: by setting CC and CXX in the environment if needed. (#1247) * Switched to SIP 5 for generating the wrapper code. Rather than a standalone - executable SIP is now a Python package that needs to be installed in the + executable, SIP is now a Python package that needs to be installed in the Python environment used for the build. A dependency has been added to requirements/devel.txt to help ensure that the correct version is installed. diff --git a/demo/Joystick.py b/demo/Joystick.py index 9cfef5d8..8c5e9638 100644 --- a/demo/Joystick.py +++ b/demo/Joystick.py @@ -160,10 +160,10 @@ class JoyPanel(wx.Panel): t = wx.StaticText(self, -1, "X - Y Axes", style = wx.ALIGN_CENTRE) t.SetFont(fn) - sizer.Add(t, 0, wx.ALL | wx.EXPAND | wx.ALIGN_CENTER | wx.ALIGN_CENTER_HORIZONTAL, 1) + sizer.Add(t, 0, wx.ALL | wx.EXPAND, 1) self.control = JoyGauge(self, self.stick) - sizer.Add(self.control, 1, wx.ALL | wx.EXPAND | wx.ALIGN_CENTER | wx.ALIGN_CENTER_HORIZONTAL, 1) + sizer.Add(self.control, 1, wx.ALL | wx.EXPAND, 1) self.SetSizer(sizer) sizer.Fit(self) @@ -355,11 +355,11 @@ class POVPanel(wx.Panel): gsizer.Add(t, 0, wx.ALL | wx.EXPAND, 1) self.display = POVGauge(self, stick) - gsizer.Add(self.display, 1, wx.ALL | wx.EXPAND | wx.ALIGN_CENTER, 1) - sizer.Add(gsizer, 1, wx.ALL | wx.EXPAND | wx.ALIGN_CENTER, 1) + gsizer.Add(self.display, 1, wx.ALL | wx.EXPAND, 1) + sizer.Add(gsizer, 1, wx.ALL | wx.EXPAND, 1) self.status = POVStatus(self, stick) - sizer.Add(self.status, 1, wx.ALL | wx.EXPAND | wx.ALIGN_CENTER, 1) + sizer.Add(self.status, 1, wx.ALL | wx.EXPAND, 1) self.SetSizer(sizer) sizer.Fit(self) @@ -743,14 +743,14 @@ class Axis(wx.Panel): self.Max = wx.StaticText(self, -1, str(self.GetMax()), style=wx.ALIGN_LEFT) self.bar = AxisBar(self) - sizer.Add(self.Min, 0, wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 1) - sizer.Add(self.bar, 1, wx.ALL | wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL, 1) - sizer.Add(self.Max, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 1) + sizer.Add(self.Min, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 1) + sizer.Add(self.bar, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 1) + sizer.Add(self.Max, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 1) else: # We go here if the axis in question is not available. self.control = wx.StaticText(self, -1, ' *** Not Present ***') - sizer.Add(self.control, 1, wx.ALL | wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL, 1) + sizer.Add(self.control, 1, wx.ALL, 1) #----------------------------------------------------------------------------