k-donn / plasmoid-wunderground

A Plasma 5/6 widget for showing data from Wunderground PWS
https://store.kde.org/p/2135799
GNU General Public License v2.0
35 stars 12 forks source link

Plasma 6 widget not displaying weather icons/graphics #52

Open edwardp3 opened 3 months ago

edwardp3 commented 3 months ago

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.

demmm commented 3 months ago

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

edwardp3 commented 3 months ago

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

k-donn commented 3 months ago

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.

edwardp3 commented 3 months ago

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.

k-donn commented 3 months ago

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!

edwardp3 commented 3 months ago

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

It looks good.

Screenshot_20240317_002259

Screenshot_20240317_002317

edwardp3 commented 3 months ago

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.

k-donn commented 3 months ago

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.

edwardp3 commented 3 months ago

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

Screenshot_20240319_084056

k-donn commented 3 months ago

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

tabascosw commented 3 months ago

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

k-donn commented 3 months ago

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.

edwardp3 commented 3 months ago

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

k-donn commented 3 months ago

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!

edwardp3 commented 3 months ago

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