]> git.phdru.name Git - m_librarian.git/commitdiff
Feat(wx): Get initial window size from session config
authorOleg Broytman <phd@phdru.name>
Tue, 19 Dec 2023 16:06:39 +0000 (19:06 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 19 Dec 2023 16:08:03 +0000 (19:08 +0300)
Else use sensible defaults.

[skip ci]

m_librarian/wx/Application.py

index a12eb0e64a3deb93abe6eef767dec04a4c2eaf76..bebaa276366b5008964364cf753a8131a8b5a742 100644 (file)
@@ -9,8 +9,11 @@ class MainWindow(wx.Frame):
 
     def __init__(self):
         session_config = get_session_config()
+        width = session_config.getint('main_window', 'width', 600)
+        height = session_config.getint('main_window', 'height', 400)
         super(wx.Frame, self).__init__(
             parent=None, id=-1, title=u"m_Librarian",
+            size=wx.Size(width=width, height=height),
         )
         self.InitMenu()
         self.Show(True)