mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
libs: minor Plasma::WidgetExplorer optimizations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1e43f8bd11
commit
27e116fbc4
1 changed files with 5 additions and 3 deletions
|
@ -44,6 +44,9 @@ static const int s_margin = 4;
|
||||||
static const QSizeF s_appletframesize = QSize(300, 94);
|
static const QSizeF s_appletframesize = QSize(300, 94);
|
||||||
static const QSizeF s_appleticonsize = QSize(80, 80);
|
static const QSizeF s_appleticonsize = QSize(80, 80);
|
||||||
static const int s_filterwidth = 305;
|
static const int s_filterwidth = 305;
|
||||||
|
// the default Plasma::Corona MIME type, see:
|
||||||
|
// kdelibs/plasma/corona.cpp
|
||||||
|
static const QString s_coronamimetype = QString::fromLatin1("text/x-plasmoidservicename");
|
||||||
|
|
||||||
Qt::Orientation kOrientationForLocation(const Plasma::Location location)
|
Qt::Orientation kOrientationForLocation(const Plasma::Location location)
|
||||||
{
|
{
|
||||||
|
@ -95,7 +98,7 @@ void AppletIcon::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||||
// have to parent it to QWidget*..
|
// have to parent it to QWidget*..
|
||||||
QDrag* drag = new QDrag(qApp->activeWindow());
|
QDrag* drag = new QDrag(qApp->activeWindow());
|
||||||
QMimeData* mimedata = new QMimeData();
|
QMimeData* mimedata = new QMimeData();
|
||||||
mimedata->setData(QString::fromLatin1("text/x-plasmoidservicename"), m_appletinfo.pluginName().toUtf8());
|
mimedata->setData(s_coronamimetype, m_appletinfo.pluginName().toUtf8());
|
||||||
drag->setMimeData(mimedata);
|
drag->setMimeData(mimedata);
|
||||||
drag->start();
|
drag->start();
|
||||||
}
|
}
|
||||||
|
@ -370,8 +373,7 @@ void WidgetExplorerPrivate::updateRunningApplets()
|
||||||
{
|
{
|
||||||
const QStringList running = runningApplets.values();
|
const QStringList running = runningApplets.values();
|
||||||
foreach (AppletFrame* appletFrame, appletFrames) {
|
foreach (AppletFrame* appletFrame, appletFrames) {
|
||||||
const QString appletPluginName = appletFrame->pluginInfo().pluginName();
|
appletFrame->setRunning(running.contains(appletFrame->pluginInfo().pluginName()));
|
||||||
appletFrame->setRunning(running.contains(appletPluginName));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue