weather-widget-2 icon indicating copy to clipboard operation
weather-widget-2 copied to clipboard

(Plasma 6) Icon size in tray

Open galibozek opened this issue 11 months ago • 22 comments

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

galibozek avatar Mar 10 '24 21:03 galibozek

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 avatar Mar 10 '24 22:03 blackadderkate

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

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

galibozek avatar Mar 10 '24 22:03 galibozek

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 avatar Mar 10 '24 22:03 blackadderkate

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

blackadderkate avatar Mar 25 '24 15:03 blackadderkate

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

galibozek avatar Mar 25 '24 15:03 galibozek

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.

gvaleika avatar Mar 25 '24 20:03 gvaleika

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

Drommer avatar Mar 26 '24 22:03 Drommer

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!

blackadderkate avatar Mar 27 '24 12:03 blackadderkate

Version 3.0.3: Zrzut ekranu_20240404_081356

galibozek avatar Apr 04 '24 06:04 galibozek

Looks wonderful now in 3.0.3 for me as well.

Good job

Screenshot_20240404_235503

ShalokShalom avatar Apr 04 '24 21:04 ShalokShalom

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

Drommer avatar Apr 05 '24 16:04 Drommer

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.

Whyhow314 avatar Apr 05 '24 17:04 Whyhow314

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

evgeniy-harchenko avatar Apr 05 '24 17:04 evgeniy-harchenko

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.

Drommer avatar Apr 06 '24 17:04 Drommer

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

Horizontal

Vertical

evgeniy-harchenko avatar Apr 06 '24 18:04 evgeniy-harchenko

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.

blackadderkate avatar Apr 06 '24 22:04 blackadderkate

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

Drommer avatar Apr 06 '24 22:04 Drommer

@Drommer , fixed in https://github.com/blackadderkate/weather-widget-2/pull/177/commits/ce015e5514c97db6503d91e3ef9571203562f512

evgeniy-harchenko avatar Apr 07 '24 09:04 evgeniy-harchenko

the widget uses a different font than the system default

fixed in https://github.com/blackadderkate/weather-widget-2/pull/177/commits/1269737d794bc1a92c10cf60712f1ba733302b40

evgeniy-harchenko avatar Apr 07 '24 09:04 evgeniy-harchenko

3.0.4 solves the problem for me

galibozek avatar Apr 12 '24 18:04 galibozek

Now it looks great. Thank you.

WW

McCloud1710 avatar Apr 14 '24 22:04 McCloud1710

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.

mikebutash avatar May 18 '24 19:05 mikebutash