┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/sidebartreeview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-06-13 17:42:16 +0000
committerPeter Penz <[email protected]>2007-06-13 17:42:16 +0000
commit2cb45d81a5d61fbb703c8dac342d9945aed35e41 (patch)
tree56082701f95563cd990c50344f73b3d3694e3967 /src/sidebartreeview.cpp
parent862ceee323ad3b474ce9de11eefbddd99c528fac (diff)
provide a common drawing method for the hover indication during drag & drop until issue/wish #160611 is solved in Qt4.4
svn path=/trunk/KDE/kdebase/apps/; revision=675042
Diffstat (limited to 'src/sidebartreeview.cpp')
-rw-r--r--src/sidebartreeview.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/sidebartreeview.cpp b/src/sidebartreeview.cpp
index f82bff37a..6e79171de 100644
--- a/src/sidebartreeview.cpp
+++ b/src/sidebartreeview.cpp
@@ -19,9 +19,10 @@
#include "sidebartreeview.h"
+#include "dolphincontroller.h"
+
#include <kdirmodel.h>
#include <kfileitemdelegate.h>
-
#include <QKeyEvent>
#include <QPainter>
#include <QHeaderView>
@@ -114,16 +115,10 @@ void SidebarTreeView::paintEvent(QPaintEvent* event)
{
QTreeView::paintEvent(event);
+ // TODO: remove this code when the issue #160611 is solved in Qt 4.4
if (m_dragging) {
- // TODO: remove this code when the issue #160611 is solved in Qt 4.4
- QPainter painter(viewport());
- painter.save();
- QBrush brush(palette().brush(QPalette::Normal, QPalette::Highlight));
- QColor color = brush.color();
- color.setAlpha(64);
- brush.setColor(color);
- painter.fillRect(m_dropRect, brush);
- painter.restore();
+ const QBrush& brush = palette().brush(QPalette::Normal, QPalette::Highlight);
+ DolphinController::drawHoverIndication(viewport(), m_dropRect, brush);
}
}