summaryrefslogtreecommitdiffstats
path: root/qml
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2019-05-17 14:22:44 +0200
committerPapoteur <papoteur@mageia.org>2019-05-17 14:30:27 +0200
commit68d8004ce23d61b96c8076dad49d79fa8e532a55 (patch)
treec2f0820dd29c6a6a2c99101ed50f91822ad94f9a /qml
parent4ca11997cd6b278ad8a919bc6f0e2f1c47a6f392 (diff)
downloadmageiawelcome-68d8004ce23d61b96c8076dad49d79fa8e532a55.tar
mageiawelcome-68d8004ce23d61b96c8076dad49d79fa8e532a55.tar.gz
mageiawelcome-68d8004ce23d61b96c8076dad49d79fa8e532a55.tar.bz2
mageiawelcome-68d8004ce23d61b96c8076dad49d79fa8e532a55.tar.xz
mageiawelcome-68d8004ce23d61b96c8076dad49d79fa8e532a55.zip
Resize to maximal available space if smaller than default
Diffstat (limited to 'qml')
-rw-r--r--qml/mageiawelcome.py4
-rw-r--r--qml/mw-ui.qml5
2 files changed, 5 insertions, 4 deletions
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py
index 83193d9..310d2e8 100644
--- a/qml/mageiawelcome.py
+++ b/qml/mageiawelcome.py
@@ -191,8 +191,8 @@ if __name__ == '__main__':
sc = nr.startupcheck()
factor = cl.factor(app)
screen = app.primaryScreen()
- defaultHeight = 700 * factor
- defaultWidth = 1000 * factor
+ defaultHeight = min(700 * factor, screen.availableGeometry().height())
+ defaultWidth = min(1000 * factor, screen.availableGeometry().width())
centerPoint = screen.availableGeometry().center()
view.setGeometry(centerPoint.x() -defaultWidth/2, centerPoint.y() - defaultHeight/2, defaultWidth,defaultHeight)
view.rootContext().setContextProperty('link', cb)
diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml
index ed1623f..d2bf720 100644
--- a/qml/mw-ui.qml
+++ b/qml/mw-ui.qml
@@ -11,14 +11,15 @@ import QtQuick.Dialogs 1.1
Rectangle {
id: box
- width: 1000 * Screen.devicePixelRatio; height: 650 * Screen.devicePixelRatio
+ //width: 1000 * Screen.devicePixelRatio; height: 650 * Screen.devicePixelRatio
property alias view: view
- //: For Right to Left language, set this string to RTL
+ //: For Right to Left language, set this string to RTL, else keep it untranslated
property var direction: qsTr("LTR")
LayoutMirroring.enabled: (direction == "LTR" ? false : true)
// for tests
//LayoutMirroring.enabled: true
+ // TO-DO GridLayout RowLayout are not sensible to mirroring, change to other layout tools
LayoutMirroring.childrenInherit: true
Settings {