diff options
| author | xiphon <xiphon@protonmail.com> | 2021-01-13 03:14:57 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2021-01-13 03:14:57 +0000 |
| commit | 55baa8b6959e1bdd17ae35bab06d57b2ed940e73 (patch) | |
| tree | a615503df10ccaeb35fbc105cfa4569f54579fa6 | |
| parent | 3ca5f10fa8ce901a94188d4c76c5e5e8e8bf3ff2 (diff) | |
| download | monzero-gui-55baa8b6959e1bdd17ae35bab06d57b2ed940e73.tar.gz monzero-gui-55baa8b6959e1bdd17ae35bab06d57b2ed940e73.tar.xz monzero-gui-55baa8b6959e1bdd17ae35bab06d57b2ed940e73.zip | |
main: restrict max window width/height, fix initial window alignment
| -rw-r--r-- | main.qml | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1123,11 +1123,14 @@ ApplicationWindow { objectName: "appWindow" visible: true - width: screenWidth > 980 ? 980 : 800 - height: screenHeight > maxWindowHeight ? maxWindowHeight : 700 + width: Screen.desktopAvailableWidth > 980 + ? 980 + : Math.min(Screen.desktopAvailableWidth, 800) + height: Screen.desktopAvailableHeight > maxWindowHeight + ? maxWindowHeight + : Math.min(Screen.desktopAvailableHeight, 700) color: MoneroComponents.Style.appWindowBackgroundColor flags: persistentSettings.customDecorations ? Windows.flagsCustomDecorations : Windows.flags - onWidthChanged: x -= 0 Timer { id: fiatPriceTimer @@ -1284,8 +1287,8 @@ ApplicationWindow { } Component.onCompleted: { - x = (Screen.width - width) / 2 - y = (Screen.height - maxWindowHeight) / 2 + x = (Screen.desktopAvailableWidth - width) / 2; + y = (Screen.desktopAvailableHeight - height) / 2; translationManager.setLanguage(persistentSettings.locale.split("_")[0]); |
