From kde-commits Mon Sep 14 16:48:32 2009 From: Anne-Marie Mahfouf Date: Mon, 14 Sep 2009 16:48:32 +0000 To: kde-commits Subject: branches/KDE/4.3/kdeplasma-addons/applets/frame Message-Id: <1252946912.767730.5934.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=125294692113782 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 -#include #include #include - +#include #include #include @@ -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;