diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-12-03 15:55:08 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-03 15:55:08 -0800 |
commit | d20e25419f527d92c06de7b4008e2816544b6125 (patch) | |
tree | 031fb67d4f2f3f48556569d1a160594aaa495a53 /qt-mobile/qml/Log.qml | |
parent | 2413f23cd54f7b2fb6b7b0a7fa6e873ddc0d5717 (diff) | |
download | subsurface-d20e25419f527d92c06de7b4008e2816544b6125.tar.gz |
QML-UI: make Log page scrollable
I noticed when sending a bunch of debug output to the log that it didn't scroll
and that seemed wrong.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/Log.qml')
-rw-r--r-- | qt-mobile/qml/Log.qml | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/qt-mobile/qml/Log.qml b/qt-mobile/qml/Log.qml index 5fff8db8d..b20df215c 100644 --- a/qt-mobile/qml/Log.qml +++ b/qt-mobile/qml/Log.qml @@ -6,25 +6,43 @@ import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 import org.subsurfacedivelog.mobile 1.0 +import org.kde.plasma.mobilecomponents 0.2 as MobileComponents -Item { +MobileComponents.Page { id: logWindow width: parent.width - height: parent.height objectName: "Log" + flickable: logFlick + ScrollView { + anchors.fill: parent + Flickable { + id: logFlick + anchors.fill: parent + contentHeight: logContent.height + clip: true + Item { + id: logContent + width: logFlick.width + height: childrenRect.height + MobileComponents.Units.smallSpacing * 2 - ColumnLayout { - width: parent.width - height: parent.height - spacing: 8 + ColumnLayout { + anchors { + left: parent.left + right: parent.right + top: parent.top + margins: MobileComponents.Units.smallSpacing + } + spacing: MobileComponents.Units.smallSpacing - Rectangle { - Layout.fillHeight: true - Layout.fillWidth: true - Text { - anchors.fill: parent - wrapMode: Text.WrapAnywhere - text: manager.logText + Text { + wrapMode: Text.WrapAnywhere + text: manager.logText + } + Item { + height: MobileComponents.Units.gridUnit * 3 + width: height + } + } } } } |