Zren / plasma-applets

This monolithic repo has been broken up into individual repos for each widget.
84 stars 23 forks source link

Event Calendar: Overlapping TImer and Agenda, when Meteogram Hidden #71

Closed AndydeCleyre closed 7 years ago

AndydeCleyre commented 7 years ago

Arch Linux pkver 42

image

With the meteogram hidden and the timer shown, it might make sense to place the specific-time buttons to the right of the rest of the timer.

Zren commented 7 years ago

I'm guessing you've changed the system setting font heights?


As for your feature request, I was hoping to have the agenda push upwards like this:

2017-04-05___15-54-26

Video: https://streamable.com/dr5s1

I originally tried doing this with Layout.column/index but it didn't go back to the correct position when the state changed after you added the meteogram back. That caused the widgets to overlay on each other until plasmashell restarts. This would be a pretty severe bug to a new user who plays around with the settings. The only way I saw to fix that was to assign the column/row index for every possible state (4 binary states = 2^4 = 16 states) which I didn't really want to do.

In my video above, I tried using AnchorChanges and it seems to work well. There's a slight shift [Edit: in the calendar's header] caused by something. Maybe a 1px height change? Meh.

Zren commented 7 years ago

Ah, thought so, the slight shift is caused by it trying to calculate an uneven distance. There's no shift in the default popup.height=400+10+100 in plasmashell, it only shifts in plasmoidviewer since the height isn't correct.

qml: monthView.height 313 <= all shown
qml: monthView.height 323 <= meteogram hidden, layout attempting to fit to size
qml: monthView.height 313 <= calculates the margin
qml: monthView.height 313
qml: monthView.height 313
qml: monthView.height 313.5 <= final weird height... meh
Zren commented 7 years ago

Hmmm. Looks like I'll need to calculate the height of the top row based on the height of the timer when it's visible. Your screenshot shows the text+buttons use up more than the 100px I allow them. Guess I shouldn't be using a hardcoded value like an idiot.

AndydeCleyre commented 7 years ago

I'm guessing you've changed the system setting font heights?

I set the KDE font via systemsettings5 (Dosis, 16), if that's what you mean.

Zren commented 7 years ago

Fixed in v43