From 8231b5b0eb4afa385392fbe0259f9fecdb459907 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 15 Jun 2016 13:24:51 +0200 Subject: testbench: center the window upon completion instead of using bindings The x/y bindings to screen center cause troubles when moving the window between screens. At least on OS X, the x/y bindings prevent moving the window to a second screen (it snaps back). Change-Id: I238e278c5338e926633be518143f22b5b18a4422 Reviewed-by: Mitch Curtis --- tests/manual/testbench/main.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/manual/testbench/main.qml b/tests/manual/testbench/main.qml index bbeb795b..2fdc52af 100644 --- a/tests/manual/testbench/main.qml +++ b/tests/manual/testbench/main.qml @@ -48,11 +48,14 @@ import QtQuick.Controls.Universal 2.0 ApplicationWindow { id: window visible: true - x: Screen.width / 2 - width / 2 - y: Screen.height / 2 - height / 2 width: 750 height: 1000 + Component.onCompleted: { + x = Screen.width / 2 - width / 2 + y = Screen.height / 2 - height / 2 + } + Material.theme: themeSwitch.checked ? Material.Dark : Material.Light Universal.theme: themeSwitch.checked ? Universal.Dark : Universal.Light -- cgit v1.2.3