Store window position in GSettings
This commit is contained in:
parent
d451318029
commit
595c456518
1 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
from gi.repository import Adw
|
||||
from gi.repository import Gtk
|
||||
from .gsettings import GSettings
|
||||
|
||||
@Gtk.Template(resource_path='/net/jeena/jnotes/ui/window.ui')
|
||||
class JnotesWindow(Adw.ApplicationWindow):
|
||||
|
@ -30,3 +31,10 @@ class JnotesWindow(Adw.ApplicationWindow):
|
|||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
# Remember window state
|
||||
GSettings.bind("width", self, "default_width")
|
||||
GSettings.bind("height", self, "default_height")
|
||||
GSettings.bind("maximized", self, "maximized")
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue