Commit 21e864bb authored by Bharadwaj Raju's avatar Bharadwaj Raju
Browse files

Fuzzy-clock, binary-clock: Fix clicking applets again to close calendar

Previously, clicking the applets made them expand (all good), but clicking them again didn't make them un-expand. The calendar just flashed. Pretty jarring and contradictory to user expectation from other applets.


(cherry picked from commit da29a832)
parent 41bda67a
Pipeline #243866 passed with stage
in 3 minutes and 7 seconds
......@@ -60,12 +60,14 @@ Item {
readonly property real displayTop: (height - 4*dotSize-3*PlasmaCore.Units.smallSpacing)/2
readonly property real displayLeft: (width - dots*dotSize-(dots-1)*PlasmaCore.Units.smallSpacing)/2
/* displaying calendar after clicking binary clock applet */
property bool wasExpanded: false
MouseArea {
id: mouseArea
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: plasmoid.expanded = !plasmoid.expanded
onPressed: wasExpanded = plasmoid.expanded
onClicked: plasmoid.expanded = !wasExpanded
}
/* hours */
......
......@@ -280,11 +280,14 @@ Item {
}
}
property bool wasExpanded: false
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: plasmoid.expanded = !plasmoid.expanded
onPressed: wasExpanded = Plasmoid.expanded
onClicked: Plasmoid.expanded = !wasExpanded
}
Text {
......
Supports Markdown
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