mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
show more!
This commit is contained in:
parent
60825add90
commit
e7bf696c28
2 changed files with 23 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.bottomMargin: 10
|
anchors.bottomMargin: 10
|
||||||
|
|
||||||
|
property bool expanded: false
|
||||||
property var textGradient: Gradient {
|
property var textGradient: Gradient {
|
||||||
GradientStop { position: 1.0; color: "#FF00000C" }
|
GradientStop { position: 1.0; color: "#FF00000C" }
|
||||||
GradientStop { position: 0.0; color: "#00000C00" }
|
GradientStop { position: 0.0; color: "#00000C00" }
|
||||||
|
|
@ -38,6 +39,21 @@ Rectangle {
|
||||||
SpringAnimation { spring: 2; damping: 0.2 }
|
SpringAnimation { spring: 2; damping: 0.2 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Behavior on height {
|
||||||
|
SpringAnimation { spring: 5; damping: 0.3 }
|
||||||
|
}
|
||||||
|
|
||||||
|
onExpandedChanged: {
|
||||||
|
if (expanded) {
|
||||||
|
height = units.gridUnit * 2;
|
||||||
|
summaryText.text = summary;
|
||||||
|
} else {
|
||||||
|
height = units.gridUnit * 4;
|
||||||
|
if (body) {
|
||||||
|
summaryText.text = summary + "\n" + body;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: root
|
anchors.fill: root
|
||||||
drag.axis: Drag.XAxis
|
drag.axis: Drag.XAxis
|
||||||
|
|
@ -49,6 +65,8 @@ Rectangle {
|
||||||
} else {
|
} else {
|
||||||
parent.x = 0;
|
parent.x = 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
parent.expanded = !parent.expanded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -56,6 +74,7 @@ Rectangle {
|
||||||
PlasmaCore.IconItem {
|
PlasmaCore.IconItem {
|
||||||
id: icon
|
id: icon
|
||||||
width: units.iconSizes.medium
|
width: units.iconSizes.medium
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
height: width
|
height: width
|
||||||
x: units.largeSpacing
|
x: units.largeSpacing
|
||||||
y: 0
|
y: 0
|
||||||
|
|
@ -73,9 +92,10 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
id: roundedRect
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: parent.width * 2
|
width: parent.width * 2
|
||||||
radius: height
|
radius: height //Math.max(height, units.gridUnit)
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
top: parent.top
|
top: parent.top
|
||||||
|
|
@ -107,6 +127,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: summaryText
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
horizontalAlignment: Qt.AlignLeft
|
horizontalAlignment: Qt.AlignLeft
|
||||||
verticalAlignment: Qt.AlignVCenter
|
verticalAlignment: Qt.AlignVCenter
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ Item {
|
||||||
ListElement {
|
ListElement {
|
||||||
appIcon: "call-start"
|
appIcon: "call-start"
|
||||||
summary: "Missed call from Joe"
|
summary: "Missed call from Joe"
|
||||||
|
body: "Called at 8:42 from +41 56 373 37 31"
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
appIcon: "im-google"
|
appIcon: "im-google"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue