Zren / plasma-applet-eventcalendar

https://store.kde.org/p/998901/
469 stars 93 forks source link

Make applet use expanded version if there is enough space? #268

Open zeparu opened 3 years ago

zeparu commented 3 years ago

my usecase is that i would like to have a on-demand latte dock sidebar, which is really thick, and have things like notifications, media player and other stuff inside it.

the issue here is, that when i want to add the event calendar in there, it will not show the "expanded version" of the applet, like there is for notifications/media player, but will just use all that space to show a small, centered time display in there.

it would be nice, if, either dynamically depending on the available space, or with a setting, that the applet will itself show its own expanded version for those kind of use cases.

fhp commented 2 years ago

I have the same usecase: I would like to add a big panel to the side of my screen, and add a calendar and TODO-list there. This widget would be perfect for my usecase if it could also show the full version in the panel.

Zren commented 2 years ago

Normally there's a switchWidth/switchHeight, but it's a little annoying to code as there's already a dozen of settings that manipulate the size of the widget so there isn't really a sweet spot for determining the size when switching representations.

Here's where you can edit the code:
~/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/main.qml
https://github.com/Zren/plasma-applet-eventcalendar/blob/master/package/contents/ui/main.qml#L196-L199

BelkaDev commented 2 years ago

If you want to force the behaviour: In ~/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/main.qml replace

Plasmoid.preferredRepresentation: isDesktopContainment ? Plasmoid.fullRepresentation : Plasmoid.compactRepresentation to Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation

However this is a hack as you won't be able to use it compacted

BelkaDev commented 2 years ago

Update: I created a pull request to allow setting up this option in the settings