Zren / plasma-applets

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

Event Calendar doesn't use the right scaling #66

Closed sudhirkhanger closed 7 years ago

sudhirkhanger commented 7 years ago

As you can see in the screenshot below all plasma widgets are of particular size but event calendar is almost double the size. I am on 1920x1080p screen with 141dpi.

screenshot_20170303_184458 screenshot_20170303_184519

Zren commented 7 years ago

141dpi sounds a bit weird, mostly because 96 dpi is the default. Double would be 192. 1.5x would be 144.

Every other widget uses a multiple of units.gridUnit which is apparently based off the text height or something? Font scaling is usually jumpy. I'm using units.devicePixelRatio which is based on your just your dpi.

You can edit PopupView.qml at /home/chris/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/PopupView.qml and change the minimum height if you like. This line right here is what you need to change for the preferredWidth (https://github.com/Zren/plasma-applets/blob/master/org.kde.plasma.eventcalendar/package/contents/ui/PopupView.qml#L40). The height is set here under bottomRowHeight.

Run killall plasmashell; kstart5 plasmashell to reload the panel with your changes.

Zren commented 7 years ago

Edited previous comment, you need to change the preferredWidth not the minimumWidth

sudhirkhanger commented 7 years ago

I got the dpi from the dpi.lv website.

screenshot_20170303_202159

Zren commented 7 years ago

I actually forgot I made it a bit larger than the default widgets. I wouldn't call it double the size though.

At 141 DPI, it's still not much bigger.

Does it really need to be the same size? The smaller I make it, the less items are visible in the agenda usually shown on the left.

Zren commented 7 years ago

Though I guess I could make it the same size as default when all the other widgets aren't visible.

Zren commented 7 years ago

Popup w/o Agenda is Width/Height is 378px. Without the padding around the calendar, it's 342px. When the agenda is added, the width of the calendar is 351px while the height is still 342px. So I'll chose 342px.

This will be in the next version. I'll probably release in tonight or tomorrow. I'll close the issue when it's released.

Zren commented 7 years ago

Added in v43