notification strip to spec

This commit is contained in:
Aaron Seigo 2014-09-29 14:27:23 +02:00
parent 9ba1dee6ab
commit fa6bbc2b13

View file

@ -0,0 +1,81 @@
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
Rectangle {
id: root
color: "#00000000"
height: units.gridUnit * 2
anchors {
bottomMargin: units.smallSpacing
topMargin: units.smallSpacing
}
property var textGradient: Gradient {
GradientStop { position: 1.0; color: "#FF00000C" }
GradientStop { position: 0.0; color: "#00000C00" }
}
property color textGradientOverlay: "#9900000C"
PlasmaCore.IconItem {
id: icon
width: units.iconSizes.medium
height: width
x: units.largeSpacing
y: 0
source: "im-user"
}
Item {
id: rounded
clip: true
height: parent.height
width: height / 2
anchors {
left: icon.right
leftMargin: units.largeSpacing
}
Rectangle {
height: parent.height
width: parent.width * 2
radius: height
anchors {
left: parent.left
top: parent.top
}
gradient: root.textGradient
Rectangle {
anchors.fill: parent
radius: height / 2
color: textGradientOverlay
}
}
}
Rectangle {
id: summary
width: parent.width - icon.width - rounded.width - (units.largeSpacing * 2)
height: parent.height
anchors {
left: rounded.right
top: parent.top
}
gradient: root.textGradient
Rectangle {
anchors.fill: parent
color: textGradientOverlay
}
Text {
anchors.fill: parent
horizontalAlignment: Qt.AlignLeft
verticalAlignment: Qt.AlignVCenter
color: "white"
text: "Hoo ha!"
}
}
}