@ -31,26 +31,14 @@ Item {
property string name
property string userName
property alias iconSource: face . source
property alias faceSize: face . width
property alias notification: notificationText . text
readonly property int padding: 3 / / f a c e . f i x e d M a r g i n s . t o p
property alias faceSize: frame . width
signal clicked ( )
width: userItemWidth
height: userItemHeight
height: faceSize + loginText . implicitHeight
opacity: isCurrent ? 1.0 : 0.618
Rectangle { / / d e b u g
visible: debug
border.color: "blue"
border.width: 1
anchors.fill: parent
color: "#00000000"
z: - 1000
}
Behavior on opacity {
NumberAnimation { duration: 250 }
}
@ -62,7 +50,6 @@ Item {
top: parent . top
left: parent . left
right: parent . right
topMargin: padding * 3
}
height: parent . height * 2 / 3
@ -82,68 +69,41 @@ Item {
id: frame
imagePath: "widgets/background"
/ / w i d t h i s s e t i n a l i a s a t t o p
height: width
anchors {
fill: face
margins: - padding * 3
horizontalCenter: parent . horizontalCenter
top: parent . top
}
}
PlasmaCore . IconItem {
id: face
anchors {
horizontalCenter: parent . horizontalCenter
top: parent . top
fill: frame
/ / n e g a t i v e t o m a k e f r a m e a r o u n d t h e i m a g e
topMargin: frame . margins . top
leftMargin: frame . margins . left
rightMargin: frame . margins . right
bottomMargin: frame . margins . bottom
}
height: width
}
}
BreezeLabel {
id: loginText
anchors {
bottom: notificationText . top
left: parent . left
right: parent . right
}
text: wrapper . name
elide: Text . ElideRight
horizontalAlignment: Text . AlignHCenter
maximumLineCount: 2
wrapMode: Text . Wrap
height: Math . round ( Math . max ( paintedHeight , theme . mSize ( theme . defaultFont ) . height * 1.2 ) )
Rectangle { / / d e b u g
visible: debug
border.color: "red"
border.width: 1
anchors.fill: parent
color: "#00000000"
z: - 1000
}
}
BreezeLabel {
id: notificationText
anchors {
bottom: parent . bottom
left: parent . left
right: parent . right
bottomMargin: padding
}
text: wrapper . name
elide: Text . ElideRight
horizontalAlignment: Text . AlignHCenter
maximumLineCount: 2
wrapMode: Text . Wrap
font.weight: Font . Bold
height: Math . round ( Math . max ( paintedHeight , theme . mSize ( theme . defaultFont ) . height * 1.2 ) )
Rectangle { / / d e b u g
visible: debug
border.color: "yellow"
border.width: 1
anchors.fill: parent
color: "#00000000"
z: - 1000
}
}
MouseArea {