diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2015-07-30 08:17:09 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-30 06:14:34 -0700 |
commit | 10e531d9072c9762df6c372c4a77309f4090c708 (patch) | |
tree | c5f5b6a54ea66c04672f94896a6ba9c33a8b3c27 /qt-mobile/DiveDetails.qml | |
parent | d337def212acb6836ad93c2ec27625a19bfcdc61 (diff) | |
download | subsurface-10e531d9072c9762df6c372c4a77309f4090c708.tar.gz |
QML UI: dynamic button sizes
Butons are sized based in the text printed on them,
we want our buttons to have a meaningful minimum size and a
preferred size that is similar regardless of screen resolution.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/DiveDetails.qml')
-rw-r--r-- | qt-mobile/DiveDetails.qml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-mobile/DiveDetails.qml b/qt-mobile/DiveDetails.qml index 64b7398cc..6f8e83bfd 100644 --- a/qt-mobile/DiveDetails.qml +++ b/qt-mobile/DiveDetails.qml @@ -4,6 +4,7 @@ import QtQuick.Controls.Styles 1.2 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.1 +import QtQuick.Window 2.2 import org.subsurfacedivelog.mobile 1.0 Item { @@ -44,10 +45,12 @@ Item { Button { id: backButton Layout.margins: 0.1 * height + Layout.preferredWidth: Screen.width * 0.1 text: "\u2190" style: ButtonStyle { background: Rectangle { color: "#4C68A2" + implicitWidth: 50 } label: Text { id: txt |