aboutsummaryrefslogtreecommitdiffstats
path: root/src/remotesettings
diff options
context:
space:
mode:
authorGrigorii Zimin <gzimin@luxoft.com>2019-09-26 09:26:41 +0300
committerGrigorii Zimin <gzimin@luxoft.com>2019-09-26 15:23:59 +0000
commita67de82d496ca7d1b8e8e9f6c59cf7291df1f87f (patch)
treef1a4dacdd3cf9bf0b44bb4f188291addbb308bba /src/remotesettings
parentb79b8dde706537b3c03597cee7843fabda57f96c (diff)
[companion-app] change start-up size
If there is monitor with FH resolution companion app starts with minimum size Task-number: AUTOSUITE-1207 Change-Id: I5f9339c8cf1a40687f6514be5b33dcb41f10bea2 Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
Diffstat (limited to 'src/remotesettings')
-rw-r--r--src/remotesettings/app/main.qml22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/remotesettings/app/main.qml b/src/remotesettings/app/main.qml
index 398cb6d4..66af7c01 100644
--- a/src/remotesettings/app/main.qml
+++ b/src/remotesettings/app/main.qml
@@ -43,8 +43,6 @@ ApplicationWindow {
id: root
visible: true
- width: 1280
- height: 800
minimumHeight: 720
minimumWidth: 400
@@ -58,7 +56,25 @@ ApplicationWindow {
}
Component.onCompleted: {
- connectionDialog.open()
+ var screens = Qt.application.screens;
+ var minH = 1080;
+ var minW = 1920;
+ for (var scr in screens) {
+ console.info(scr)
+ minH = Math.min(minH, screens[scr].height);
+ minW = Math.min(minW, screens[scr].width);
+ }
+
+ // if FHD shrink to min
+ if (minH <= 1080 || minW <= 1920) {
+ root.width = minimumWidth;
+ root.height = minimumHeight;
+ } else {
+ root.width = 1280;
+ root.height = 800;
+ }
+
+ connectionDialog.open();
}
UISettings {