┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphindetailsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dolphindetailsview.cpp')
-rw-r--r--src/dolphindetailsview.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp
index df07fb9a5..87fa85165 100644
--- a/src/dolphindetailsview.cpp
+++ b/src/dolphindetailsview.cpp
@@ -71,7 +71,7 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr
connect(this, SIGNAL(activated(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
connect(this, SIGNAL(entered(const QModelIndex&)),
- controller, SLOT(emitItemEntered(const QModelIndex&)));
+ this, SLOT(slotEntered(const QModelIndex&)));
connect(this, SIGNAL(viewportEntered()),
controller, SLOT(emitViewportEntered()));
connect(controller, SIGNAL(zoomIn()),
@@ -192,6 +192,18 @@ void DolphinDetailsView::synchronizeSortingState(int column)
m_controller->indicateSortOrderChange(sortOrder);
}
+void DolphinDetailsView::slotEntered(const QModelIndex& index)
+{
+ const QPoint pos = viewport()->mapFromGlobal(QCursor::pos());
+ const int nameColumnWidth = header()->sectionSize(KDirModel::Name);
+ if (pos.x() < nameColumnWidth) {
+ m_controller->emitItemEntered(index);
+ }
+ else {
+ m_controller->emitViewportEntered();
+ }
+}
+
void DolphinDetailsView::zoomIn()
{
if (isZoomInPossible()) {