mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
notification strip to spec
This commit is contained in:
parent
9ba1dee6ab
commit
fa6bbc2b13
1 changed files with 81 additions and 0 deletions
81
shell/contents/components/NotificationStripe.qml
Normal file
81
shell/contents/components/NotificationStripe.qml
Normal 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!"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue