Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panel Text Overlapping Neighbor Widget #27

Closed
gnemonix opened this issue Sep 7, 2021 · 3 comments
Closed

Panel Text Overlapping Neighbor Widget #27

gnemonix opened this issue Sep 7, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@gnemonix
Copy link

gnemonix commented Sep 7, 2021

First thing after logging in to a new session the panel text is overlapping it's neighbor widget on the right. (see screenshot)

Upon going to Configuration -> Appearance and changing the font size (Compact Representation) to anything else and hitting Apply, the panel width and margins are recalculated. Then I can set the font size to my desired size, or even auto.

This is immediately after login.
weather_on_login

This is after font size twiddling.
weather_after_font_size_twiddling

plasmoid-wunderground version 2.3.7 (also had issue on 2.3.3 before updating)
plasmashell 5.22.5
Qt: 5.15.2
KDE Frameworks: 5.85.0
kf5-config: 1.0

Thanks.

@gnemonix gnemonix added the bug Something isn't working label Sep 7, 2021
@k-donn
Copy link
Owner

k-donn commented Sep 20, 2021

Hello! Sorry about the late response.

The size of the widget is dynamically calculated based on a helper element. The helper element depends on the configuration values. So, the size of the widget is currently only changed when the config values change.

The critical part is here (Notice the TODO as I predicted this might be an issue)

// TODO: use property binding or states inside of "text" instead of this?

I can add a Component.onCompleted call in IconAndTextItem.qml that actually sets the size of the widget when the widget first loads.

I'll work on this ASAP

Thanks!

@k-donn
Copy link
Owner

k-donn commented Jan 25, 2022

Hello again.

I have done some debugging of the widget. The problem is not related to the calculation of the helper size element. Instead, the size of the icon is not properly calculated when the widget first loads.

With my settings, the text should be 80px wide and the icon should be 64px wide. However, on first load the width of the icon is only 16px wide. Then, I have to follow the behavior you mentioned and change the font size under Appearance which then somehow the icon now calculated its width properly and the widget is correctly resized.

I cannot find anything on the internet about "KDE Plasma SVG icon size not calculated on first load" so I am going to look through the QML rendering engine and see about anything I might be able to do to solve this.

I am currently seeing about a hacky solution that would involve manually multiplying the size of the icon on first load.

Thank you very much for understanding my busy schedule and delay!

@k-donn
Copy link
Owner

k-donn commented Apr 14, 2024

As far as I can tell, this is now fixed in plasma 6. Immediately, after logging in, the widget's boundaries are correctly calculated.

@k-donn k-donn closed this as completed Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants