Setting "x" and "y" should not change window size
This commit is contained in:
parent
b70e7c6a4c
commit
428c5b6d01
1 changed files with 1 additions and 4 deletions
|
@ -112,10 +112,7 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
||||||
int x = -1, y = -1;
|
int x = -1, y = -1;
|
||||||
bool center;
|
bool center;
|
||||||
if (options.Get(switches::kX, &x) && options.Get(switches::kY, &y)) {
|
if (options.Get(switches::kX, &x) && options.Get(switches::kY, &y)) {
|
||||||
int width = -1, height = -1;
|
SetPosition(gfx::Point(x, y));
|
||||||
options.Get(switches::kWidth, &width);
|
|
||||||
options.Get(switches::kHeight, &height);
|
|
||||||
SetBounds(gfx::Rect(x, y, width, height));
|
|
||||||
} else if (options.Get(switches::kCenter, ¢er) && center) {
|
} else if (options.Get(switches::kCenter, ¢er) && center) {
|
||||||
Center();
|
Center();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue