Commit 98898d6a authored by Marco Martin's avatar Marco Martin
Browse files

Fix layout for the reviews sheet

Summary:
* the main contentitem of a sheet should have *always* an explicit implicitWidth
* never use anchors for delegates

Test Plan:
ireviews sheet works ok now both in desktop and mobile modes
before:
{F7875527}
after:
{F7875529}

Reviewers: #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26566
parent 9146b5da
......@@ -30,6 +30,10 @@ RowLayout {
property bool separator: true
signal markUseful(bool useful)
Item {
Layout.fillHeight: true
Layout.preferredWidth: Kirigami.Units.largeSpacing
}
// Spacers to indent nested comments/replies
Repeater {
model: depth
......@@ -186,4 +190,8 @@ RowLayout {
}
}
}
Item {
Layout.fillHeight: true
Layout.preferredWidth: Kirigami.Units.largeSpacing * 2
}
}
......@@ -50,6 +50,7 @@ Kirigami.OverlaySheet {
clip: true
spacing: Kirigami.Units.smallSpacing
implicitWidth: Kirigami.Units.gridUnit * 25
cacheBuffer: Math.max(0, contentHeight)
header: ColumnLayout {
......@@ -79,12 +80,7 @@ Kirigami.OverlaySheet {
}
delegate: ReviewDelegate {
anchors {
left: parent.left
right: parent.right
topMargin: Kirigami.Units.largeSpacing
bottomMargin: Kirigami.Units.largeSpacing
}
width: parent.width
separator: index != ListView.view.count-1
onMarkUseful: page.model.markUseful(index, useful)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment