window: Set title and window icon
The window icon doesn't exist at this point, but set the name based on what it will be called once we configure the icon theme properly Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
6f3558a83e
commit
5f23e34972
|
@ -0,0 +1 @@
|
|||
# Copyright 2021 (c) Anna Schumaker.
|
|
@ -0,0 +1 @@
|
|||
# Copyright 2021 (c) Anna Schumaker.
|
|
@ -1,5 +1,6 @@
|
|||
# Copyright 2021 (c) Anna Schumaker.
|
||||
from lib import settings
|
||||
from lib import version
|
||||
from . import window
|
||||
from gi.repository import Gtk
|
||||
import unittest
|
||||
|
@ -17,6 +18,9 @@ class TestUIWindow(unittest.TestCase):
|
|||
self.assertIsInstance(window.Window, Gtk.ApplicationWindow)
|
||||
window.Window.present()
|
||||
|
||||
self.assertEqual(window.Window.get_title(), version.string())
|
||||
self.assertEqual(window.Window.get_icon_name(), "emmental")
|
||||
|
||||
def test_window_resize(self):
|
||||
self.assertEqual(settings.get_int("window.width"), 1100)
|
||||
self.assertEqual(settings.get_int("window.height"), 600)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Copyright 2021 (c) Anna Schumaker.
|
||||
from lib import settings
|
||||
from lib import version
|
||||
import gi
|
||||
gi.require_version("Gtk", "4.0")
|
||||
from gi.repository import Gtk
|
||||
|
@ -12,6 +13,8 @@ def initialize():
|
|||
settings.initialize("window.maximized", False)
|
||||
initialize()
|
||||
|
||||
Window.set_title(version.string())
|
||||
Window.set_icon_name("emmental")
|
||||
Window.set_default_size(settings.get_int("window.width"),
|
||||
settings.get_int("window.height"))
|
||||
if settings.get_bool("window.maximized"):
|
||||
|
|
Loading…
Reference in New Issue