window: Simplify saving/loading window states
Follow https://wiki.gnome.org/HowDoI/SaveWindowState * Use tuples in gsetting schema to save size and position * Save changes to variable instead of saving to gsettings after every timemout * Save the changes back to gsettings when the window is finalized.
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
<summary>Window maximized</summary>
|
||||
<description>Window maximized state</description>
|
||||
</key>
|
||||
<key name="window-size" type="ai">
|
||||
<default>[768, 600]</default>
|
||||
<key name="window-size" type="(ii)">
|
||||
<default>(768, 600)</default>
|
||||
<summary>Window size</summary>
|
||||
<description>Window size (width and height).</description>
|
||||
</key>
|
||||
<key name="window-position" type="ai">
|
||||
<default>[]</default>
|
||||
<key name="window-position" type="(ii)">
|
||||
<default>(-1, -1)</default>
|
||||
<summary>Window position</summary>
|
||||
<description>Window position (x and y).</description>
|
||||
</key>
|
||||
|
||||
Reference in New Issue
Block a user