aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-06-16 02:02:00 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-06-16 02:02:00 -0700
commitb45340389b696d83809343ac6cf4550b729d0f9d (patch)
tree724e808dac82ad3dad006b238dfcad5441d49c0e /mobile-widgets/qml
parent77a3e6ac704c84548d383818dfbe17e3378b8151 (diff)
downloadsubsurface-b45340389b696d83809343ac6cf4550b729d0f9d.tar.gz
QML UI: better App Log
This should actually scroll and be much simple. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/Log.qml35
1 files changed, 15 insertions, 20 deletions
diff --git a/mobile-widgets/qml/Log.qml b/mobile-widgets/qml/Log.qml
index ac848961b..b7dbae50f 100644
--- a/mobile-widgets/qml/Log.qml
+++ b/mobile-widgets/qml/Log.qml
@@ -10,32 +10,27 @@ import org.kde.kirigami 2.0 as Kirigami
Kirigami.ScrollablePage {
id: logWindow
+ width: parent.width - Kirigami.Units.gridUnit
anchors.margins: Kirigami.Units.gridUnit / 2
objectName: "Log"
title: qsTr("Application Log")
- property int pageWidth: subsurfaceTheme.columnWidth - Kirigami.Units.smallSpacing
-
- ColumnLayout {
- width: logWindow.width - logWindow.leftPadding - logWindow.rightPadding - 2 * Kirigami.Units.smallSpacing
- spacing: Kirigami.Units.smallSpacing
- Kirigami.Heading {
+ ListView {
+ anchors.fill: parent
+ model: logModel
+ currentIndex: -1
+ boundsBehavior: Flickable.StopAtBounds
+ maximumFlickVelocity: parent.height * 5
+ cacheBuffer: Math.max(5000, parent.height * 5)
+ focus: true
+ clip: true
+ header : Kirigami.Heading {
text: qsTr("Application Log")
}
-
- ListView {
- width: parent.width;
- height: 500
- model: logModel
- delegate : Text {
- text : message
- }
- }
-
- Rectangle {
- color: "transparent"
- height: Kirigami.Units.gridUnit * 2
- width: pageWidth
+ delegate : Text {
+ width: parent.width
+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ text : message
}
}
}