Skip to content

Commit 79faa1f

Browse files
authored
Merge b9b838f into ec91451
2 parents ec91451 + b9b838f commit 79faa1f

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

source/gui/_addonStoreGui/controls/messageDialogs.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,15 @@ def __init__(self, parent: wx.Window):
240240

241241
sHelper.sizer.AddSpacer(SPACE_BETWEEN_VERTICAL_DIALOG_ITEMS)
242242

243-
self.dontShowAgainCheckbox = sHelper.addLabeledControl(
244-
pgettext(
245-
"addonStore",
246-
# Translators: The label of a checkbox in the add-on store warning dialog
247-
"&Don't show this message again"
243+
self.dontShowAgainCheckbox = sHelper.addItem(
244+
wx.CheckBox(
245+
self,
246+
label=pgettext(
247+
"addonStore",
248+
# Translators: The label of a checkbox in the add-on store warning dialog
249+
"&Don't show this message again"
250+
),
248251
),
249-
wx.CheckBox,
250252
)
251253

252254
bHelper = sHelper.addDialogDismissButtons(ButtonHelper(wx.HORIZONTAL))

source/gui/guiHelper.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ def associateElements(firstElement: wx.Control, secondElement: wx.Control) -> wx
136136
# likely a labelled control from LabeledControlHelper
137137
if isinstance(firstElement, wx.StaticText) and isinstance(secondElement, (
138138
wx.Button,
139-
wx.CheckBox,
140139
wx.Choice,
141140
wx.Slider,
142141
wx.SpinCtrl,
@@ -146,6 +145,12 @@ def associateElements(firstElement: wx.Control, secondElement: wx.Control) -> wx
146145
sizer.Add(firstElement, flag=wx.ALIGN_CENTER_VERTICAL)
147146
sizer.AddSpacer(SPACE_BETWEEN_ASSOCIATED_CONTROL_HORIZONTAL)
148147
sizer.Add(secondElement)
148+
elif isinstance(firstElement, wx.StaticText) and isinstance(secondElement, wx.CheckBox):
149+
# checkbox should go first, and label should go after
150+
sizer = wx.BoxSizer(wx.HORIZONTAL)
151+
sizer.Add(secondElement)
152+
sizer.AddSpacer(SPACE_BETWEEN_ASSOCIATED_CONTROL_HORIZONTAL)
153+
sizer.Add(firstElement, flag=wx.ALIGN_CENTER_VERTICAL)
149154
# staticText and (ListCtrl, ListBox or TreeCtrl)
150155
elif isinstance(firstElement, wx.StaticText) and isinstance(secondElement, (wx.ListCtrl,wx.ListBox,wx.TreeCtrl)):
151156
sizer = wx.BoxSizer(wx.VERTICAL)

0 commit comments

Comments
 (0)