window: Set the minimum size of the window
This is required by libadwaita breakpoints Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
3241830c8e
commit
b02fd609f7
|
@ -39,7 +39,8 @@ class Window(Adw.Window):
|
||||||
def __init__(self, version: str, **kwargs):
|
def __init__(self, version: str, **kwargs):
|
||||||
"""Initialize our Window."""
|
"""Initialize our Window."""
|
||||||
super().__init__(icon_name="emmental", title=version,
|
super().__init__(icon_name="emmental", title=version,
|
||||||
default_width=1600, default_height=900, **kwargs)
|
default_width=1600, default_height=900,
|
||||||
|
width_request=525, height_request=500, **kwargs)
|
||||||
self._box = Gtk.Box.new(Gtk.Orientation.VERTICAL, 0)
|
self._box = Gtk.Box.new(Gtk.Orientation.VERTICAL, 0)
|
||||||
self._header = Adw.Bin(child=self.header)
|
self._header = Adw.Bin(child=self.header)
|
||||||
self._inner_pane = _make_pane(Gtk.Orientation.VERTICAL,
|
self._inner_pane = _make_pane(Gtk.Orientation.VERTICAL,
|
||||||
|
|
|
@ -31,6 +31,9 @@ class TestWindow(unittest.TestCase):
|
||||||
self.assertEqual(self.window.get_title(), "Test 1.2.3")
|
self.assertEqual(self.window.get_title(), "Test 1.2.3")
|
||||||
self.assertEqual(self.window.get_default_size(), (1600, 900))
|
self.assertEqual(self.window.get_default_size(), (1600, 900))
|
||||||
|
|
||||||
|
self.assertEqual(self.window.props.width_request, 525)
|
||||||
|
self.assertEqual(self.window.props.height_request, 500)
|
||||||
|
|
||||||
def test_content(self):
|
def test_content(self):
|
||||||
"""Check that the Window content is set up properly."""
|
"""Check that the Window content is set up properly."""
|
||||||
self.assertEqual(self.window._box.get_orientation(),
|
self.assertEqual(self.window._box.get_orientation(),
|
||||||
|
|
Loading…
Reference in New Issue