mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
QML UI: better App Log
This should actually scroll and be much simple. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
77a3e6ac70
commit
b45340389b
1 changed files with 15 additions and 20 deletions
|
@ -10,32 +10,27 @@ import org.kde.kirigami 2.0 as Kirigami
|
||||||
|
|
||||||
Kirigami.ScrollablePage {
|
Kirigami.ScrollablePage {
|
||||||
id: logWindow
|
id: logWindow
|
||||||
|
width: parent.width - Kirigami.Units.gridUnit
|
||||||
anchors.margins: Kirigami.Units.gridUnit / 2
|
anchors.margins: Kirigami.Units.gridUnit / 2
|
||||||
objectName: "Log"
|
objectName: "Log"
|
||||||
title: qsTr("Application Log")
|
title: qsTr("Application Log")
|
||||||
|
|
||||||
property int pageWidth: subsurfaceTheme.columnWidth - Kirigami.Units.smallSpacing
|
ListView {
|
||||||
|
anchors.fill: parent
|
||||||
ColumnLayout {
|
model: logModel
|
||||||
width: logWindow.width - logWindow.leftPadding - logWindow.rightPadding - 2 * Kirigami.Units.smallSpacing
|
currentIndex: -1
|
||||||
spacing: Kirigami.Units.smallSpacing
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
Kirigami.Heading {
|
maximumFlickVelocity: parent.height * 5
|
||||||
|
cacheBuffer: Math.max(5000, parent.height * 5)
|
||||||
|
focus: true
|
||||||
|
clip: true
|
||||||
|
header : Kirigami.Heading {
|
||||||
text: qsTr("Application Log")
|
text: qsTr("Application Log")
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
|
||||||
width: parent.width;
|
|
||||||
height: 500
|
|
||||||
model: logModel
|
|
||||||
delegate : Text {
|
delegate : Text {
|
||||||
|
width: parent.width
|
||||||
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
text : message
|
text : message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
color: "transparent"
|
|
||||||
height: Kirigami.Units.gridUnit * 2
|
|
||||||
width: pageWidth
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue