diff --git a/sources/desktop-panel/desktop-panel.cpp b/sources/desktop-panel/desktop-panel.cpp index e298530..4da5906 100644 --- a/sources/desktop-panel/desktop-panel.cpp +++ b/sources/desktop-panel/desktop-panel.cpp @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include #include @@ -115,6 +117,7 @@ void DesktopPanel::init() timer->setSingleShot(false); timer->setInterval(2000); connect(timer, SIGNAL(timeout()), this, SLOT(updateTooltip())); + connect(this, SIGNAL(releaseVisualFocus()), this, SLOT(paintTooltip())); timer->start(); connect(this, SIGNAL(activate()), this, SLOT(changePanelsState())); connect(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)), this, SLOT(updateText(int))); @@ -278,6 +281,13 @@ void DesktopPanel::changePanelsState() } +void DesktopPanel::paintTooltip() +{ + if (debug) qDebug() << PDEBUG; + qDebug() << PDEBUG; +} + + void DesktopPanel::setCurrentDesktop(const int number) { if (debug) qDebug() << PDEBUG; @@ -325,7 +335,7 @@ void DesktopPanel::updateTooltip() if (debug) qDebug() << PDEBUG; if (configuration[QString("tooltip")].toInt() != 2) return; - for (int i=0; isetBackgroundBrush(QBrush(Qt::NoBrush)); QGraphicsView *toolTipView = new QGraphicsView(toolTipScene); @@ -356,7 +366,7 @@ void DesktopPanel::updateTooltip() QString url = QString(""); - labels[i]->setToolTip(url); + proxyWidgets[i]->setToolTip(url); delete toolTipView; delete toolTipScene; } diff --git a/sources/desktop-panel/desktop-panel.h b/sources/desktop-panel/desktop-panel.h index b716563..c900a69 100644 --- a/sources/desktop-panel/desktop-panel.h +++ b/sources/desktop-panel/desktop-panel.h @@ -83,6 +83,7 @@ public slots: private slots: void reinit(); + void paintTooltip(); void setFontFormating(); void setFormating(); void updateText(const int active);