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

(Plasma 6) Icon size in tray #170

Open
galibozek opened this issue Mar 10, 2024 · 22 comments
Open

(Plasma 6) Icon size in tray #170

galibozek opened this issue Mar 10, 2024 · 22 comments
Assignees
Labels
bug Something isn't working

Comments

@galibozek
Copy link
Contributor

galibozek commented Mar 10, 2024

The icon does not scale when I use a narrow panel (width: 21)
Zrzut ekranu_20240310_220456

@blackadderkate
Copy link
Owner

Yes I noticed this earlier.

The code previously used to detect whether it was running in the tray no longer works in Plasma6 - so it defaults to a size suitable for a standalone widget in the panel.

I've literally just posted a question on the KDE Community Forum Development page to see if there's a fix/workaround for this...

Short term you can just tweak the icon size in the configuration settings.

@blackadderkate blackadderkate self-assigned this Mar 10, 2024
@blackadderkate blackadderkate added the bug Something isn't working label Mar 10, 2024
@galibozek
Copy link
Contributor Author

Short term you can just tweak the icon size in the configuration settings.

I can't find it :/ hint in which settings?

@blackadderkate
Copy link
Owner

Short term you can just tweak the icon size in the configuration settings.

I can't find it :/ hint in which settings?

Just turned my laptop off (using the github app on my phone to reply), but I think it's in Appearance, called Widget font-size or something like that...

@blackadderkate
Copy link
Owner

The widget font should now scale properly in both the tray, and as a system widget.

@galibozek
Copy link
Contributor Author

scaling seems to work, but the text fits into the icon when the layout is set to horizontal
Zrzut ekranu_20240325_160819

@gvaleika
Copy link

gvaleika commented Mar 25, 2024

overlap not only text with icon, but widget noticeably extends beyond reserved "area":

Screenshot_20240325_223446

I would say the widget too modestly reserves panel area.

@Drommer
Copy link

Drommer commented Mar 26, 2024

I confirm. In versions 3.0.0 and 3.0.1 this blending is observed.

@blackadderkate
Copy link
Owner

The issue is that the widget needs to display differently depending on its location (desktop / panel / system tray) and orientation (horizontal and vertical) - and react to changes in panel orientation or size, as well as user changes to the widget layout.

I've yet to find a solution that works for every single location, orientation, and panel and widget layout change...

But rest assured I am working on it!

@galibozek
Copy link
Contributor Author

Version 3.0.3:
Zrzut ekranu_20240404_081356

@ShalokShalom
Copy link

Looks wonderful now in 3.0.3 for me as well.

Good job

Screenshot_20240404_235503

@Drommer
Copy link

Drommer commented Apr 5, 2024

In the latest update, the icon on the horizontally positioned panel began to extend beyond the space allocated for it and overlap with neighboring ones. The temperature text value and the logo no longer overlap, but are displayed very close to each other. I would like to add at least one space.
1

@Whyhow314
Copy link

I've had a similar experience on a horizontal panel when the plasmoid starts, but if I switch it to vertical and back to horizontal the spacing seems to fix itself.

@evgeniy-harchenko
Copy link

Same with horizontal panel. It seems CompactRepresentation children do not affect widget size. Default weather widget (org.kde.plasma.weather) does not have this problem. It has Loader as root element of CompactRepresentation and content lies in Component. Maybe this information will be helpful.

This widget:
ww3

Default widget:
default_widget

@Drommer
Copy link

Drommer commented Apr 6, 2024

I've had a similar experience on a horizontal panel when the plasmoid starts, but if I switch it to vertical and back to horizontal the spacing seems to fix itself.

It helps, but only until reboot.

P.S. I'm not sure if the behavior has changed in the most recent version but now the widget uses a different font than the system default.

@evgeniy-harchenko
Copy link

evgeniy-harchenko commented Apr 6, 2024

So, I tried: #177. Just copied some things from org.kde.plasma.weather.

Horizontal

Vertical

@blackadderkate
Copy link
Owner

Work commitments have kept me too busy to code recently, but I've been watching the recent discussion with interest.

  1. Basically the widget sizing and overlapping issue is because on initial loading, when I try to query the parent width and height of the widget (ie the size of the panel) it returns zero.

So far my attempted workarounds and hacks to resize the widget after the parent dimensions are known have failed - but the loader approach looks promising. I'll have a look into it as soon as I get a chance (probably Monday before a release).
If all else fails, I'll just save the available panel width/height in the config and load it the next time it is loaded. At least that way it'll only be wrong once...

  1. The widget is supposed to use the default system font unless changed by the user in the Appearance Configuration Page. I'm not entirely sure what I changed to mess it up - but it should be a simple fix.

@Drommer
Copy link

Drommer commented Apr 6, 2024

@blackadderkate Another appearance request. I think it shouldn't be too hard. Center the caption circled in the screenshot.
1

@evgeniy-harchenko
Copy link

evgeniy-harchenko commented Apr 7, 2024

@Drommer , fixed in ce015e5

@evgeniy-harchenko
Copy link

the widget uses a different font than the system default

fixed in 1269737

@galibozek
Copy link
Contributor Author

3.0.4 solves the problem for me

@McCloud1710
Copy link

McCloud1710 commented Apr 14, 2024

Now it looks great. Thank you.

WW

@mikebutash
Copy link

Trying out this widget with 3.0.4, the appearance size doesn't seem to scale properly with other plasmoids when using with plasma 6.0.4. I normally set my plasma panel to 80px, but this doesn't scale to but a quarter or so of that. Trying to use the actual widget settings in Appearance tab to change the px to larger doesn't scale the widget either unfortunately.

Here's what this looks like next to the default weather widget:
image

I also just get a blank area when clicking on the widget where the graphic history should be. Maybe a separate matter, but would be nice to fix the size mostly, I can live without the pretty graphic.

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

9 participants