diff options
author | Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com> | 2018-08-01 07:07:49 +0000 |
---|---|---|
committer | Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com> | 2018-08-02 07:31:27 +0000 |
commit | 83c4034d6374eb8b6d5a72c053c7e774cd6c3ffc (patch) | |
tree | ed8b5b8be246a42b3b7e7f962c41b82ef894decc /launcher/qml | |
parent | 5bf038936a9759cc1634a18efd946ce5ecf10660 (diff) |
Improve output of multiple screen resolution
To improve output on various monitor with various resolution,
use scale_factor from WM to fit various screen resolution.
Bug-AGL: SPEC-1568, SPEC-1569, SPEC-1611
Change-Id: I6e71fd0a2c9cf5fbcf23ea529a094b74da6c1841
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Diffstat (limited to 'launcher/qml')
-rw-r--r-- | launcher/qml/Launcher.qml | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/launcher/qml/Launcher.qml b/launcher/qml/Launcher.qml index ccca186..6caad1e 100644 --- a/launcher/qml/Launcher.qml +++ b/launcher/qml/Launcher.qml @@ -16,33 +16,38 @@ * limitations under the License. */ import QtQuick 2.6 +import QtQuick.Window 2.1 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.0 import AppModel 1.0 -ApplicationWindow { - id: root - // Layout.fillWidth: true - // Layout.fillHeight: true - // width: 1080 - // Layout.preferredHeight: 1487 +Window { + visible: true + flags: Qt.FramelessWindowHint + width: container.width * container.scale + height: container.height * container.scale property int pid: -1 - Image { - y: 218 + + Item { + id: container anchors.centerIn: parent - source: './images/AGL_HMI_Blue_Background_Car-01.png' - } + width: 1080 + height: 1487 + scale: screenInfo.scale_factor() + Image { + anchors.centerIn: parent + source: './images/AGL_HMI_Blue_Background_Car-01.png' + } GridView { id: grid - x: 60 - y: 100 - width: 960 - height: 1280 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter + anchors { + topMargin: 60; bottomMargin: 0 + leftMargin: 60; rightMargin: 60 + fill: parent + } contentHeight: 320 flickableDirection: Flickable.AutoFlickDirection snapMode: GridView.SnapOneRow @@ -65,10 +70,6 @@ ApplicationWindow { property int index: grid.indexAt(loc.mouseX, loc.mouseY) x: 62 y: 264 - anchors.rightMargin: 0 - anchors.bottomMargin: 0 - anchors.leftMargin: 0 - anchors.topMargin: 0 onPressAndHold: currentId = applicationModel.id(newIndex = index) onReleased: { if (currentId === '') { @@ -92,3 +93,4 @@ ApplicationWindow { } } } +} |