mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 16:28:14 +00:00
Merge pull request #3302
55baa8b
main: restrict max window width/height, fix initial window alignment (xiphon)
This commit is contained in:
commit
f9f319d571
1 changed files with 8 additions and 5 deletions
13
main.qml
13
main.qml
|
@ -1126,11 +1126,14 @@ ApplicationWindow {
|
||||||
|
|
||||||
objectName: "appWindow"
|
objectName: "appWindow"
|
||||||
visible: true
|
visible: true
|
||||||
width: screenWidth > 980 ? 980 : 800
|
width: Screen.desktopAvailableWidth > 980
|
||||||
height: screenHeight > maxWindowHeight ? maxWindowHeight : 700
|
? 980
|
||||||
|
: Math.min(Screen.desktopAvailableWidth, 800)
|
||||||
|
height: Screen.desktopAvailableHeight > maxWindowHeight
|
||||||
|
? maxWindowHeight
|
||||||
|
: Math.min(Screen.desktopAvailableHeight, 700)
|
||||||
color: MoneroComponents.Style.appWindowBackgroundColor
|
color: MoneroComponents.Style.appWindowBackgroundColor
|
||||||
flags: persistentSettings.customDecorations ? Windows.flagsCustomDecorations : Windows.flags
|
flags: persistentSettings.customDecorations ? Windows.flagsCustomDecorations : Windows.flags
|
||||||
onWidthChanged: x -= 0
|
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: fiatPriceTimer
|
id: fiatPriceTimer
|
||||||
|
@ -1287,8 +1290,8 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
x = (Screen.width - width) / 2
|
x = (Screen.desktopAvailableWidth - width) / 2;
|
||||||
y = (Screen.height - maxWindowHeight) / 2
|
y = (Screen.desktopAvailableHeight - height) / 2;
|
||||||
|
|
||||||
translationManager.setLanguage(persistentSettings.locale.split("_")[0]);
|
translationManager.setLanguage(persistentSettings.locale.split("_")[0]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue