fixed restore window size for webapps
This commit is contained in:
parent
bf014d3560
commit
fd958842d2
2 changed files with 11 additions and 3 deletions
|
@ -40,6 +40,10 @@
|
||||||
<li>Moved to Meson</li>
|
<li>Moved to Meson</li>
|
||||||
<li>Support for local .html files</li>
|
<li>Support for local .html files</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>Fixed:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Restore correct window size</li>
|
||||||
|
</ul>
|
||||||
<p>Translation:</p>
|
<p>Translation:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Dutch (by Heimen Stoffels)</li>
|
<li>Dutch (by Heimen Stoffels)</li>
|
||||||
|
|
|
@ -174,7 +174,7 @@ namespace Webpin.Windows {
|
||||||
if (width != null && height != null) {
|
if (width != null && height != null) {
|
||||||
set_default_size (int.parse (width), int.parse (height));
|
set_default_size (int.parse (width), int.parse (height));
|
||||||
} else {
|
} else {
|
||||||
set_default_size (1000, 600);
|
set_default_size (1000, 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x != null && y != null) {
|
if (x != null && y != null) {
|
||||||
|
@ -198,10 +198,14 @@ namespace Webpin.Windows {
|
||||||
} else {
|
} else {
|
||||||
int x, y;
|
int x, y;
|
||||||
this.get_position (out x, out y);
|
this.get_position (out x, out y);
|
||||||
|
|
||||||
|
int width, height;
|
||||||
|
this.get_size (out width, out height);
|
||||||
|
|
||||||
desktop_file.edit_property ("X-Webpin-WindowX", x.to_string ());
|
desktop_file.edit_property ("X-Webpin-WindowX", x.to_string ());
|
||||||
desktop_file.edit_property ("X-Webpin-WindowY", y.to_string ());
|
desktop_file.edit_property ("X-Webpin-WindowY", y.to_string ());
|
||||||
desktop_file.edit_property ("X-Webpin-WindowWidth", this.get_allocated_width ().to_string ());
|
desktop_file.edit_property ("X-Webpin-WindowWidth", width.to_string ());
|
||||||
desktop_file.edit_property ("X-Webpin-WindowHeight", this.get_allocated_height ().to_string ());
|
desktop_file.edit_property ("X-Webpin-WindowHeight", height.to_string ());
|
||||||
desktop_file.edit_property ("X-Webpin-WindowMaximized", "norm");
|
desktop_file.edit_property ("X-Webpin-WindowMaximized", "norm");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue