[Weather applet] CompactRepresentation: glow icon on hover

parent 987f5fe9
......@@ -42,8 +42,11 @@ ColumnLayout {
Layout.minimumHeight: item.Layout.minimumHeight
MouseArea {
id: compactMouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: {
plasmoid.expanded = !plasmoid.expanded;
}
......@@ -57,6 +60,7 @@ ColumnLayout {
readonly property int minIconSize: Math.max((compactRoot.vertical ? compactRoot.width : compactRoot.height), units.iconSizes.small)
source: generalModel.currentConditionIconName
active: compactMouseArea.containsMouse
// reset implicit size, so layout in free dimension does not stop at the default one
implicitWidth: units.iconSizes.small
implicitHeight: units.iconSizes.small
......@@ -71,6 +75,7 @@ ColumnLayout {
IconAndTextItem {
vertical: compactRoot.vertical
iconSource: generalModel.currentConditionIconName
active: compactMouseArea.containsMouse
text: observationModel.temperature
}
}
......
......@@ -28,6 +28,7 @@ GridLayout {
property alias iconSource: icon.source
property alias text: label.text
property bool vertical: false // too bad we cannot make this an enum
property alias active: icon.active
readonly property int minimumIconSize: units.iconSizes.small
readonly property int iconSize: iconAndTextRoot.vertical ? width : height
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment