[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeplasmoids/applets/dict
From: Thomas Georgiou <tageorgiou () gmail ! com>
Date: 2008-05-31 20:48:24
Message-ID: 1212266904.528166.16485.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 814985 by tgeorgiou:
Make the icon appear in the dictionary applet again, but why is it using the small variant?
M +8 -3 dict.cpp
M +5 -2 dict.h
--- trunk/KDE/kdeplasmoids/applets/dict/dict.cpp #814984:814985
@@ -75,11 +75,13 @@
m_defBrowserProxy->hide();
// Icon in upper-left corner
QIcon icon = KIcon("accessories-dictionary");
- m_graphicsIcon = new QGraphicsPixmapItem(icon.pixmap(32,32), this);
+ //m_graphicsIcon = new QGraphicsPixmapItem(icon.pixmap(32,32), this);
+ m_icon = new Plasma::Icon(this);
+ m_icon->setIcon(icon);
// Position lineedits
//const int wordEditOffset = 40;
- m_graphicsIcon->setPos(12,3);
+ m_icon->setPos(12,3);
//m_wordProxyWidget->setPos(15 + wordEditOffset,7);
//m_wordProxyWidget->show();
// TODO m_wordEdit->setDefaultTextColor(Plasma::Theme::self()->color(Plasma::Theme::TextColor));
@@ -90,8 +92,11 @@
m_timer->setSingleShot(true);
connect(m_timer, SIGNAL(timeout()), this, SLOT(define()));
+ m_horLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+ m_horLayout->addItem(m_icon);
+ m_horLayout->addItem(m_wordProxyWidget);
m_layout = new QGraphicsLinearLayout(Qt::Vertical);
- m_layout->addItem(m_wordProxyWidget);
+ m_layout->addItem(m_horLayout);
m_layout->addItem(m_defBrowserProxy);
setLayout(m_layout);
--- trunk/KDE/kdeplasmoids/applets/dict/dict.h #814984:814985
@@ -28,6 +28,7 @@
#include <plasma/applet.h>
#include <plasma/dataengine.h>
#include <plasma/widgets/flash.h>
+#include <plasma/widgets/icon.h>
#include "ui_config.h"
class QTimer;
@@ -69,8 +70,9 @@
QString m_word;
QTimer* m_timer;
int m_autoDefineTimeout;
- QGraphicsPixmapItem *m_graphicsIcon;
- QGraphicsLinearLayout *m_layout;
+ //QGraphicsPixmapItem *m_graphicsIcon;
+ QGraphicsLinearLayout *m_layout;
+ QGraphicsLinearLayout *m_horLayout;
KLineEdit *m_wordEdit;
//Plasma::Flash *m_flash;
QStringList m_defList;
@@ -79,6 +81,7 @@
QWebView *m_defBrowser;
QGraphicsProxyWidget *m_defBrowserProxy;
QGraphicsProxyWidget *m_wordProxyWidget;
+ Plasma::Icon *m_icon;
};
K_EXPORT_PLASMA_APPLET(dict, Dict)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic