Skip to content

Commit

Permalink
GUI: Allow the Input Gestures Dialog to shrink below its initial size (
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienCochuyt committed Sep 11, 2019
1 parent cf30e1e commit 8ad6f04
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,11 @@ class InputGesturesDialog(SettingsDialog):

def __init__(self, parent):
super().__init__(parent, resizeable=True)
# Historical initial size, result of L{self.tree} being (600, 400) as of #6349.
# Setting an initial size on L{self.tree} directly would also sets its minimum size
# and thus forbid to shrink the dialog.
self.SetSize(626, 554)
self.CentreOnScreen()

def makeSettings(self, settingsSizer):
filterSizer = wx.BoxSizer(wx.HORIZONTAL)
Expand All @@ -3249,7 +3254,10 @@ def makeSettings(self, settingsSizer):
settingsSizer.AddSpacer(5)
filter.Bind(wx.EVT_TEXT, self.onFilterChange, filter)

tree = self.tree = wx.TreeCtrl(self, size=wx.Size(600, 400), style=wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT | wx.TR_SINGLE )
tree = self.tree = wx.TreeCtrl(
self,
style=wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT | wx.TR_SINGLE
)

self.treeRoot = tree.AddRoot("root")
tree.Bind(wx.EVT_TREE_SEL_CHANGED, self.onTreeSelect)
Expand Down

0 comments on commit 8ad6f04

Please sign in to comment.