diff options
| author | Peter Penz <[email protected]> | 2007-05-12 13:41:31 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-05-12 13:41:31 +0000 |
| commit | d524b384c359d48eb13dd9cb3dd23ba99bbaa093 (patch) | |
| tree | 4a2755ec64c88a11474896b45b84acd786c9e3e8 /src/dolphindetailsview.cpp | |
| parent | 794911106c265c8691689f601e4aed0862aff0b8 (diff) | |
hover fix for the details mode: hovering should only be done on the name column, all other columns behave as viewport area
svn path=/trunk/KDE/kdebase/apps/; revision=663861
Diffstat (limited to 'src/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 14 |
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()) { |
