aboutsummaryrefslogtreecommitdiff
path: root/main.qml
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-04-16 12:57:08 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-04-16 12:57:08 -0500
commita84d7bd2cb3f14f8efb4fd98a99a389ca91bccba (patch)
tree6360217ed485f50d4ede7220996971c1013a3348 /main.qml
parent84b9264d1d7fe92a6921547e72a3eb1c33af44b6 (diff)
parentba62f9c6862aa2a7447fe4e077ca179f85b5b5e4 (diff)
downloadmonzero-gui-a84d7bd2cb3f14f8efb4fd98a99a389ca91bccba.tar.gz
monzero-gui-a84d7bd2cb3f14f8efb4fd98a99a389ca91bccba.tar.xz
monzero-gui-a84d7bd2cb3f14f8efb4fd98a99a389ca91bccba.zip
Merge pull request #3404
ba62f9c main: omit QML Screen type, use QGuiApplication::primaryScreen() instead (xiphon)
Diffstat (limited to 'main.qml')
-rw-r--r--main.qml19
1 files changed, 11 insertions, 8 deletions
diff --git a/main.qml b/main.qml
index e86ea212..8c0603e8 100644
--- a/main.qml
+++ b/main.qml
@@ -73,7 +73,7 @@ ApplicationWindow {
property int restoreHeight:0
property bool daemonSynced: false
property bool walletSynced: false
- property int maxWindowHeight: (isAndroid || isIOS)? screenHeight : (screenHeight < 900)? 720 : 800;
+ property int maxWindowHeight: (isAndroid || isIOS)? screenAvailableHeight : (screenAvailableHeight < 900)? 720 : 800;
property bool daemonRunning: !persistentSettings.useRemoteNode && !disconnected
property int daemonStartStopInProgress: 0
property alias toolTip: toolTip
@@ -1118,15 +1118,14 @@ ApplicationWindow {
});
}
-
objectName: "appWindow"
visible: true
- width: Screen.desktopAvailableWidth > 980
+ width: screenAvailableWidth > 980
? 980
- : Math.min(Screen.desktopAvailableWidth, 800)
- height: Screen.desktopAvailableHeight > maxWindowHeight
+ : Math.min(screenAvailableWidth, 800)
+ height: screenAvailableHeight > maxWindowHeight
? maxWindowHeight
- : Math.min(Screen.desktopAvailableHeight, 700)
+ : Math.min(screenAvailableHeight, 700)
color: MoneroComponents.Style.appWindowBackgroundColor
flags: persistentSettings.customDecorations ? Windows.flagsCustomDecorations : Windows.flags
@@ -1285,8 +1284,12 @@ ApplicationWindow {
}
Component.onCompleted: {
- x = (Screen.desktopAvailableWidth - width) / 2;
- y = (Screen.desktopAvailableHeight - height) / 2;
+ if (screenAvailableWidth > width) {
+ x = (screenAvailableWidth - width) / 2;
+ }
+ if (screenAvailableHeight > height) {
+ y = (screenAvailableHeight - height) / 2;
+ }
translationManager.setLanguage(persistentSettings.locale.split("_")[0]);