┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphindetailsview.cpp
diff options
context:
space:
mode:
authorRafael Fernández López <[email protected]>2007-10-04 01:35:53 +0000
committerRafael Fernández López <[email protected]>2007-10-04 01:35:53 +0000
commita24c1fce8234dc0ad0116aecc06c7151bcdd1cee (patch)
treef7d58e08ef2ab56c632a741aa00f06d18e0eaf54 /src/dolphindetailsview.cpp
parent7ac3ed4e749789ae348a80638cc18906c697b306 (diff)
Changes related to the smooth scrolling. We can enable it since icefox has submitted his "division by zero" to Qt, so it should be safe. If we experience any division by
zero or report, we just disable them commenting them out and with a comment to remind ourselves to uncomment them after. The smooth scrolling is being combined with a good behavior when using the mouse wheel. Some investigation on QListView found nice stuff for KCategorizedView. Peter, I have the smooth scrolling for KDirOperator too, let me that one... I have binary incompatible changes merged there with this ones and I am committing everything together on friday. CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=720918
Diffstat (limited to 'src/dolphindetailsview.cpp')
-rw-r--r--src/dolphindetailsview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp
index 61919c140..590e3c7d8 100644
--- a/src/dolphindetailsview.cpp
+++ b/src/dolphindetailsview.cpp
@@ -108,6 +108,9 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr
m_viewOptions.font = font;
m_viewOptions.showDecorationSelected = true;
+ setVerticalScrollMode(QListView::ScrollPerPixel);
+ setHorizontalScrollMode(QListView::ScrollPerPixel);
+
updateDecorationSize();
}
@@ -153,6 +156,11 @@ bool DolphinDetailsView::event(QEvent* event)
hideColumn(DolphinModel::Rating);
hideColumn(DolphinModel::Tags);
}
+ else if (event->type() == QEvent::UpdateRequest) {
+ // A wheel movement will scroll 4 items
+ if (model()->rowCount())
+ verticalScrollBar()->setSingleStep((sizeHintForRow(0) / 3) * 4);
+ }
return QTreeView::event(event);
}