#include "dolphin_iconsmodesettings.h"
+#include <kdialog.h>
+
#include <QAbstractProxyModel>
#include <QApplication>
#include <QPainter>
Q_ASSERT(controller != 0);
setViewMode(QListView::IconMode);
setResizeMode(QListView::Adjust);
-
+ setSpacing(KDialog::spacingHint());
setMouseTracking(true);
viewport()->setAttribute(Qt::WA_Hover);
{
KListView::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(m_viewOptions.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 = m_viewOptions.palette.brush(QPalette::Normal, QPalette::Highlight);
+ DolphinController::drawHoverIndication(viewport(), m_dropRect, brush);
}
}