plasma-applet-eventcalendar icon indicating copy to clipboard operation
plasma-applet-eventcalendar copied to clipboard

Make applet use expanded version if there is enough space?

Open zeparu opened this issue 3 years ago • 4 comments

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.

zeparu avatar Sep 28 '21 11:09 zeparu

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.

fhp avatar Jun 15 '22 19:06 fhp

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

Zren avatar Jun 19 '22 02:06 Zren

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 avatar Jun 25 '22 00:06 BelkaDev

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

BelkaDev avatar Jun 25 '22 01:06 BelkaDev