summaryrefslogtreecommitdiff
path: root/lib/gui
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-07-20 09:21:24 +0200
committerGitHub <noreply@github.com>2024-07-20 09:21:24 +0200
commit8b7605a7c6d96610583228d7e621f7a625b78bc1 (patch)
tree866518751ca86fc43df555ce8394c7f77b154e06 /lib/gui
parent9c537f33b9eb4d015316a7867a9e6d1eda6cd70c (diff)
Lettering wrap font description (#3095)
Diffstat (limited to 'lib/gui')
-rw-r--r--lib/gui/lettering/main_panel.py16
-rw-r--r--lib/gui/lettering/option_panel.py2
2 files changed, 3 insertions, 15 deletions
diff --git a/lib/gui/lettering/main_panel.py b/lib/gui/lettering/main_panel.py
index a99fe46d..5393fcf3 100644
--- a/lib/gui/lettering/main_panel.py
+++ b/lib/gui/lettering/main_panel.py
@@ -67,16 +67,7 @@ class LetteringPanel(wx.Panel):
self.update_font_list()
self.set_font_list()
- self.SetSizer(outer_sizer)
- self.Layout()
-
- # SetSizerAndFit determined the minimum size that fits all the controls
- # and set the window's minimum size so that the user can't make it
- # smaller. It also set the window to that size. We'd like to give the
- # user a bit more room for text, so we'll add some height.
- size = self.options_panel.GetSize()
- size.height = size.height + 200
- self.options_panel.SetSize(size)
+ self.SetSizerAndFit(outer_sizer)
self.load_settings()
self.apply_settings()
@@ -174,9 +165,6 @@ class LetteringPanel(wx.Panel):
else:
self.options_panel.font_chooser.Append(font.marked_custom_font_name)
- def get_font_descriptions(self):
- return {font.name: font.description for font in self.fonts.values()}
-
def set_initial_font(self, font_id):
if font_id:
if font_id not in self.fonts_by_id:
@@ -242,8 +230,8 @@ class LetteringPanel(wx.Panel):
self.options_panel.back_and_forth_checkbox.Disable()
self.options_panel.back_and_forth_checkbox.SetValue(False)
+ self.options_panel.Layout()
self.update_preview()
- self.Layout()
def on_filter_changed(self, event=None):
self.update_font_list()
diff --git a/lib/gui/lettering/option_panel.py b/lib/gui/lettering/option_panel.py
index ab123f83..e0c4388b 100644
--- a/lib/gui/lettering/option_panel.py
+++ b/lib/gui/lettering/option_panel.py
@@ -102,4 +102,4 @@ class LetteringOptionsPanel(wx.Panel):
outer_sizer.Add(text_input_sizer, 2, wx.EXPAND | wx.LEFT | wx.TOP | wx.RIGHT, 10)
# set panel sizer
- self.SetSizer(outer_sizer)
+ self.SetSizerAndFit(outer_sizer)