aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-01-22 15:07:00 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-01-22 15:07:00 -0500
commitf9f319d5719fcb794767c59850ed5ef685c044d6 (patch)
treefff75c9940d5e18a3a484cea6fec8cf1e553131b
parent090dca784852dfdd31caa9cf19b0e0e977e0fbe8 (diff)
parent55baa8b6959e1bdd17ae35bab06d57b2ed940e73 (diff)
downloadmonzero-gui-f9f319d5719fcb794767c59850ed5ef685c044d6.tar.gz
monzero-gui-f9f319d5719fcb794767c59850ed5ef685c044d6.tar.xz
monzero-gui-f9f319d5719fcb794767c59850ed5ef685c044d6.zip
Merge pull request #3302
55baa8b main: restrict max window width/height, fix initial window alignment (xiphon)
-rw-r--r--main.qml13
1 files changed, 8 insertions, 5 deletions
diff --git a/main.qml b/main.qml
index 9f711ade..f94618e6 100644
--- a/main.qml
+++ b/main.qml
@@ -1126,11 +1126,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
@@ -1287,8 +1290,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]);