mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
even a bit nicer
This commit is contained in:
parent
e7bf696c28
commit
bc8e7cfa59
1 changed files with 8 additions and 8 deletions
|
|
@ -44,16 +44,13 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
onExpandedChanged: {
|
onExpandedChanged: {
|
||||||
if (expanded) {
|
if (expanded && body) {
|
||||||
height = units.gridUnit * 2;
|
|
||||||
summaryText.text = summary;
|
|
||||||
} else {
|
|
||||||
height = units.gridUnit * 4;
|
height = units.gridUnit * 4;
|
||||||
if (body) {
|
} else {
|
||||||
summaryText.text = summary + "\n" + body;
|
height = units.gridUnit * 2;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: root
|
anchors.fill: root
|
||||||
drag.axis: Drag.XAxis
|
drag.axis: Drag.XAxis
|
||||||
|
|
@ -129,10 +126,13 @@ Rectangle {
|
||||||
Text {
|
Text {
|
||||||
id: summaryText
|
id: summaryText
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
clip: true
|
||||||
horizontalAlignment: Qt.AlignLeft
|
horizontalAlignment: Qt.AlignLeft
|
||||||
verticalAlignment: Qt.AlignVCenter
|
verticalAlignment: Qt.AlignVCenter
|
||||||
color: "white"
|
color: "white"
|
||||||
text: summary
|
text: summary + (root.expanded ? (body ? "\n" + body : '') :
|
||||||
}
|
(body ? '...' : ''))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue