2017-06-07 08:56:42 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: header
|
|
|
|
property int value: 0;
|
|
|
|
property string title: "";
|
|
|
|
property string description: "";
|
|
|
|
property string image: "";
|
|
|
|
property string bg: "";
|
|
|
|
width: parent.width
|
|
|
|
height: icon.height + Theme.paddingLarge*2
|
|
|
|
/*Image {
|
|
|
|
anchors.fill: parent
|
|
|
|
asynchronous: true
|
|
|
|
fillMode: Image.PreserveAspectCrop
|
|
|
|
source: bg
|
|
|
|
opacity: 0.3
|
|
|
|
}*/
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
2020-01-16 20:29:26 +03:00
|
|
|
opacity: 0.2
|
2017-06-07 08:56:42 +03:00
|
|
|
gradient: Gradient {
|
|
|
|
GradientStop { position: 0.0; color: Theme.highlightBackgroundColor }
|
|
|
|
GradientStop { position: 1.0; color: Theme.highlightBackgroundColor }
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
Image {
|
|
|
|
id: icon
|
|
|
|
anchors {
|
|
|
|
left: parent.left
|
|
|
|
leftMargin: Theme.paddingLarge
|
|
|
|
top: parent.top
|
|
|
|
topMargin: Theme.paddingLarge
|
|
|
|
}
|
|
|
|
asynchronous: true
|
|
|
|
width: description === "" ? Theme.iconSizeMedium : Theme.iconSizeLarge
|
|
|
|
height: width
|
2020-04-29 16:30:47 +03:00
|
|
|
source:
|
|
|
|
if (icon.status === Image.Error)
|
|
|
|
source = "../../images/icon-l-profile.svg?" + (pressed
|
|
|
|
? Theme.highlightColor
|
|
|
|
: Theme.primaryColor)
|
|
|
|
else image
|
2017-06-07 08:56:42 +03:00
|
|
|
}
|
|
|
|
Column {
|
|
|
|
anchors {
|
2017-06-22 15:49:39 +03:00
|
|
|
left: icon.right
|
2017-06-07 08:56:42 +03:00
|
|
|
leftMargin: Theme.paddingLarge
|
|
|
|
right: parent.right
|
|
|
|
rightMargin: Theme.paddingLarge
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
id: ttl
|
|
|
|
text: title
|
|
|
|
height: contentHeight
|
2020-01-16 20:29:26 +03:00
|
|
|
color: Theme.primaryColor
|
2017-06-07 08:56:42 +03:00
|
|
|
font.pixelSize: Theme.fontSizeLarge
|
|
|
|
font.family: Theme.fontFamilyHeading
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
truncationMode: TruncationMode.Fade
|
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
height: description === "" ? 0 : contentHeight
|
|
|
|
text: description
|
2020-01-16 20:29:26 +03:00
|
|
|
color: Theme.primaryColor
|
2017-06-07 08:56:42 +03:00
|
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
|
|
font.family: Theme.fontFamilyHeading
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
truncationMode: TruncationMode.Fade
|
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|