MarcinOrlowski / html-clock-plasmoid

Configurable and lightweight clock widget for KDE. Stylable with QT supported subset of HTML markup, supporting variety of usable placeholders to design clock widget as you like.
67 stars 6 forks source link

Calendar view immediately reopens if open and widget is clicked #52

Closed Skrimpton closed 1 year ago

Skrimpton commented 1 year ago

What's wrong?

Calendar view immediately reopens, if open and widget is clicked


Steps to reproduce the behavior:

  1. Add widget to desktop
  2. Click widget
  3. Click widget again to close calendar view
  4. Fail and be very sad

Expected behavior

I was hoping it would close the calendar view


Runtime environment


Notes

I'm not sure if the current behavior might be a me issue, Manjaro issue, or a widget issue.

Fixed it (I think, works with my preferences) by doing this in mainContainer in HtmlClock.qml:

    property bool wasExpanded: plasmoid.expanded

        MouseArea {
            id: mouseArea
            anchors.fill: parent
            onPressed: wasExpanded = plasmoid.expanded
            onClicked: {
                plasmoid.expanded = !wasExpanded
            }
        }

COPYRIGHT DISCLAIMER: Concept is originally from some other plasmoid I don't remember the name of


Friendly PS.

This is a really superb widget. Sorry for nitpicking, and sorry if the suggested solution is bad or old news.

MarcinOrlowski commented 1 year ago

I am unable to reproduce this problem. Using the same plasmashell 5.25.5 on Kubuntu 22.10 and the calendar opens for as expected (and stays open) me when plasmoid is either on the desktop or in panel. Are you still having this problem?

Skrimpton commented 1 year ago

No, the problem is gone now. Thanks for the heads up! Dunno what it was. Haven't reformatted since the bug, so something has fixed it.

The bug was happening in all my clickable "Compact- to FullRepresentation/Popup-window"-type widgets, placed on the desktop.

Anyways, also thanks for the new update! Hope you have a nice day :)

MarcinOrlowski commented 1 year ago

Closing the ticket then. It would not be much of surprise to see inconsistent behavior of plasma across distributions. Seen that in the past too. Anyway, feel free to reopen if that would bite again.