summaryrefslogtreecommitdiffstats
path: root/kweather/stationsconfigwidget.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2023-06-01 16:30:11 +0300
committerMavridis Philippe <[email protected]>2023-06-14 14:22:13 +0300
commitbc71670331e16b15fc30214cb85c409b8c91bb9c (patch)
treeacdd9b544beb14c0c201945a4a83ff206ba8fa40 /kweather/stationsconfigwidget.cpp
parent98f2adda028489a51a9bf825b08b125ac69e127f (diff)
downloadtdetoys-bc71670331e16b15fc30214cb85c409b8c91bb9c.tar.gz
tdetoys-bc71670331e16b15fc30214cb85c409b8c91bb9c.zip
KWeather: improve icon loading and other fixes
- Fix pixelated icons (issue #19) - Fix "network offline" state - Add helper `bool weatherDataAvailable(TQString stationID)` DCOP function - Fix compatibility with old DCOP function signatures - Prevent double "Network is offline" strings in weather data. This commit introduces some new and renamed DCOP calls. Old function signatures are kept for compatibility, but are mraked as deprecated. Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'kweather/stationsconfigwidget.cpp')
-rw-r--r--kweather/stationsconfigwidget.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/kweather/stationsconfigwidget.cpp b/kweather/stationsconfigwidget.cpp
index b02d4be..66d7c22 100644
--- a/kweather/stationsconfigwidget.cpp
+++ b/kweather/stationsconfigwidget.cpp
@@ -30,6 +30,7 @@
#include <tdelocale.h>
#include <kpushbutton.h>
#include <kstandarddirs.h>
+#include <kiconloader.h>
#include "stationsconfigwidget.h"
#include "weatherservice_stub.h"
@@ -129,10 +130,7 @@ void StationsConfigWidget::scanStations()
mSelectedStations->clear();
for ( uint i = 0; i < list.count(); ++i ) {
- TQPixmap pm = mService->icon( list[ i ] );
- TQImage img = pm.convertToImage();
- img = img.smoothScale( 22, 22 );
- pm.convertFromImage( img );
+ TQPixmap pm = mService->icon( list[ i ], TDEIcon::SizeSmall );
TQString uid = list[ i ];
if (mStationMap[ uid ].isEmpty())