plasmoid-wunderground icon indicating copy to clipboard operation
plasmoid-wunderground copied to clipboard

Plasma 6 widget not displaying weather icons/graphics

Open edwardp3 opened this issue 1 year ago • 15 comments

Describe the bug

Installed Plasma 6 widget (version 2.5.5) on openSUSE Tumbleweed, no weather icons or graphics (sun, clouds) are displayed.

To Reproduce

Install Plasma 6 widget on KDE Plasma 6, configure as normal. Weather icons/graphics not displayed/ Screenshots

Screenshot_20240313_205042

Screenshot_20240313_205058

Desktop (output of plasmashell --version && kf5-config --version):

plasmashell 6.0.1 KDE Frameworks: 6.0.0 Qt version: 6.6.2

plasmashell --version && kf6-config --version
plasmashell 6.0.1
 kf6-config: command not found

Additional context Add any other context about the problem here.

edwardp3 avatar Mar 14 '24 01:03 edwardp3

This is caused by hardcoding of an images/icon path, non-exiting on normal installs: https://github.com/k-donn/plasmoid-wunderground/blob/plasma6-release/plasmoid/contents/ui/CompactRepresentation.qml#L25 https://github.com/k-donn/plasmoid-wunderground/blob/plasma6-release/plasmoid/contents/ui/ForecastItem.qml#L62

To make it work right now, hardcode it to your local settings, until it is fixed here. After adjusting those lines here: Screenshot_20240315_124926

demmm avatar Mar 15 '24 11:03 demmm

It looks like the entry for Line 25 in the link above, has some omissions/typos in it, the path is not the same as shown in the line 62 link, so I used the same path shown in the line 62 link for both.

However, there is no such /neon directory inside /home.

Otherwise, still no icons.

Screenshot_20240315_090343

Screenshot_20240315_090357

edwardp3 avatar Mar 15 '24 13:03 edwardp3

Thanks for your interest in the widget!

This is a known problem in the plasma6 port. See #49.

I was testing to see if absolute paths worked on my system, and that is the only option that works so far. I think I will change the icons to Kirigami raster icons instead of themed SVGs for now.

Loading themed SVGs never worked with relative paths and libplasma5 had a plasmoid.file method that searched the user system for the file and returned an absolute path. libplasma6 does not have this method so the loading has not worked.

k-donn avatar Mar 15 '24 15:03 k-donn

I removed the directory for it, then reinstalled the widget anew, thus restoring the file that was changed to what it was showing originally (line 25, in CompactRepresentation.qml). I will wait for the fix.

It is a nice applet, I like the way it retrieves the local forecast.

edwardp3 avatar Mar 15 '24 15:03 edwardp3

I just pushed 0.0.4 on the KDE Store and changed the icons. My system has been known not to be representative for testing, so it would be great if you could check it out and see how it's doing!

k-donn avatar Mar 17 '24 03:03 k-donn

Thank you for the update. Just installed the new widget.

It looks good.

Screenshot_20240317_002259

Screenshot_20240317_002317

edwardp3 avatar Mar 17 '24 04:03 edwardp3

I was wondering about the folded sheet of paper icon for the wind direction, whether it should be something else, then I thought about it.

In a way, it makes sense. A piece of paper is light, blowing around in the wind.

edwardp3 avatar Mar 17 '24 13:03 edwardp3

Hahahaha, thank you. The paper is a stop-gap measure until the widget can load custom wind vane icons properly. But I am glad it makes sense until then.

k-donn avatar Mar 17 '24 15:03 k-donn

The icon for Wintry Mix, also shows the paper icon.

Screenshot_20240319_084056

edwardp3 avatar Mar 19 '24 12:03 edwardp3

Got it. Line 30 of psw-api.js should be weather-freezing-rain-symbolic.

k-donn avatar Mar 19 '24 13:03 k-donn

Are you sure, I think it still should be 'weather-few-clouds-symbolic', it looked a bit funny this morning here. Almost no clouds. I checked the wunderground page for my location and it gave me 'weather-few-clouds-symbolic' = 30. The attached screenshot shows the correct icon (#3o)

Screenshot_20240320_090625

tabascosw avatar Mar 20 '24 08:03 tabascosw

I see where the confusion is. @tabascosw line 30 of the file pws-api.js needed to be changed, but not the value of key 30 in the JSON object. You are correct. The value of key 30 is the right icon name.

Line 30 corresponds to key 7 of the JSON object, which has the incorrect name. @edwardp3 A new version that fixed the wintry mix icon and the paper icon is out.

k-donn avatar Mar 20 '24 23:03 k-donn

The Plasma 6 applet cannot be updated in the same manner as the Plasma 5 applet. Discover doesn't see it, it must first be deleted from the Plasmoid directory, then deleted from the directory of applets, then a system reboot to make sure the old applet is gone. Then reinstalled. In my opinion, KDE 6 was released prematurely.

The new applet was installed. If the wind direction arrow is designed to point in the wind direction shown, it's incorrect.

Screenshot_20240320_205909

Screenshot_20240320_210604

edwardp3 avatar Mar 21 '24 01:03 edwardp3

Thanks for checking it! Yeah, testing new versions of the plasmoid is quite slow and annoying. I previously used kpackagetool5 to update the plasmoid, but kpackagetool6 does not work. :(

What I feared was true for the arrow: it does not rotate around its tail but instead in the middle of the arrow. This will require a proper Rotation QML type to be applied instead of just setting a number to the rotation property. I will push this out.

Using the old icons that I put a lot of effort into is my priority, and I delegate most of my time to this. I am still asking/searching for a solution. In the future, I will leave an option to use system-themed icons instead of my custom bundled ones.

Until then, thank you again for using the widget!

k-donn avatar Mar 21 '24 01:03 k-donn

I'm pleased to use it.

It's 10:19 PM / 22:19 here currently and the widget is now displaying the current conditions (from both stations) as sun and cloudy. Curious as to what calls the icons. Although it rained earlier, the current icon probably should be moon and cloudy, given the current time.

Screenshot_20240320_221920

edwardp3 avatar Mar 21 '24 02:03 edwardp3

Hello, I also have a strange sheet insted of arrow. Can you tell me how to fix it? Screenshot_2024_24_07_0_14

mozo78 avatar Jul 23 '24 21:07 mozo78

@mozo78 I think the problem comes from the icon name the widget uses: gnumeric-object-arrow. You should look in Cuttlefish and see if you have that icon in your theme.

I assumed it was a standard icon but I now see that it is not, sorry. Installing an icon named gnumeric-object-arrow should solve the problem, or changing icon themes to one that has it would solve it.

Sorry again because those would be pretty annoying solutions. The end goal solution is using the custom SVGs I made but plasma 6 is making that hard.

k-donn avatar Jul 24 '24 19:07 k-donn

It's not a such big problem, don't worry :)

Installing an icon named gnumeric-object-arrow should solve the problem

How shoud I do that?

I saw the icon that the widget is getting :) Screenshot_2024_25_07_0_16

mozo78 avatar Jul 24 '24 21:07 mozo78

You place the file gnumeric-object-arrow.svg into your theme's icon directory. Make sure it gets saved to disk with that name.

The exact directory depends on the theme you are using. I am using breeze-dark so it is at:

/usr/share/icons/breeze-dark/actions/22/gnumeric-object-arrow.svg

In short, put it in the actions directory part of your theme. The structure is different for some themes. For oxygen, the actions dir is at:

/usr/share/icons/oxygen/base/22x22/actions/

The directory for your theme may be at ~/.local/share/icons/ so search there too. With some poking around you should hopefully be able to find it!

k-donn avatar Jul 25 '24 01:07 k-donn

Yes it's working, thank you for your splendid work!!!

mozo78 avatar Jul 25 '24 08:07 mozo78