mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +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: {
|
||||
if (expanded) {
|
||||
height = units.gridUnit * 2;
|
||||
summaryText.text = summary;
|
||||
} else {
|
||||
if (expanded && body) {
|
||||
height = units.gridUnit * 4;
|
||||
if (body) {
|
||||
summaryText.text = summary + "\n" + body;
|
||||
}
|
||||
} else {
|
||||
height = units.gridUnit * 2;
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: root
|
||||
drag.axis: Drag.XAxis
|
||||
|
|
@ -129,10 +126,13 @@ Rectangle {
|
|||
Text {
|
||||
id: summaryText
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
horizontalAlignment: Qt.AlignLeft
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
color: "white"
|
||||
text: summary
|
||||
text: summary + (root.expanded ? (body ? "\n" + body : '') :
|
||||
(body ? '...' : ''))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue