[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.3/kdeplasma-addons/applets/frame
From:       Anne-Marie Mahfouf <annma () kde ! org>
Date:       2009-09-14 16:48:32
Message-ID: 1252946912.767730.5934.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1023373 by annma:

fix default picture as the svg one is blurred


 M  +1 -1      CMakeLists.txt  
 M  +3 -8      picture.cpp  


--- branches/KDE/4.3/kdeplasma-addons/applets/frame/CMakeLists.txt #1023372:1023373
@@ -30,4 +30,4 @@
 
 install(TARGETS plasma_applet_frame DESTINATION ${PLUGIN_INSTALL_DIR})
 install(FILES plasma-frame-default.desktop DESTINATION ${SERVICES_INSTALL_DIR})
-install(FILES picture-frame-default.svgz DESTINATION \
${DATA_INSTALL_DIR}/desktoptheme/default/widgets/) +install(FILES \
                picture-frame-default.jpg DESTINATION \
                ${DATA_INSTALL_DIR}/plasma-applet-frame/)
--- branches/KDE/4.3/kdeplasma-addons/applets/frame/picture.cpp #1023372:1023373
@@ -21,11 +21,10 @@
 #include "picture.h"
 
 #include <QPainter>
-#include <KSvgRenderer>
 #include <QTextOption>
 
 #include <KUrl>
-
+#include <KStandardDirs>
 #include <klocalizedstring.h>
 #include <plasma/theme.h>
 
@@ -43,14 +42,10 @@
 
 QImage Picture::defaultPicture(const QString &message)
 {
-    // Create a QImage with same axpect ratio of default svg and current pixelSize
-    QString svgFile = \
                Plasma::Theme::defaultTheme()->imagePath("widgets/picture-frame-default");
                
-    KSvgRenderer sr(svgFile);
-    QImage imload(sr.defaultSize(), QImage::Format_RGB32);//TODO optimize, too slow
+    QString defaultPic = KGlobal::dirs()->findResource("data", \
"plasma-applet-frame/picture-frame-default.jpg");  
+    QImage imload(defaultPic);
     QPainter p(&imload);
-    sr.render(&p, QRect(QPoint(0, 0), imload.size()));
-
     // Set the font and draw text
     p.setRenderHint(QPainter::Antialiasing);
     QFont textFont;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic