+void DolphinIconsView::showEvent(QShowEvent* event)
+{
+ KFileItemDelegate* delegate = dynamic_cast<KFileItemDelegate*>(itemDelegate());
+ delegate->setMaximumSize(m_itemSize);
+
+ KCategorizedView::showEvent(event);
+}
+
+void DolphinIconsView::leaveEvent(QEvent* event)
+{
+ KCategorizedView::leaveEvent(event);
+ // if the mouse is above an item and moved very fast outside the widget,
+ // no viewportEntered() signal might be emitted although the mouse has been moved
+ // above the viewport
+ m_controller->emitViewportEntered();
+}
+
+void DolphinIconsView::currentChanged(const QModelIndex& current, const QModelIndex& previous)
+{
+ KCategorizedView::currentChanged(current, previous);
+ if (current.isValid() && !m_autoScroller->isActive()) {
+ scrollTo(current);
+ }
+}
+
+void DolphinIconsView::resizeEvent(QResizeEvent* event)
+{
+ KCategorizedView::resizeEvent(event);
+ const DolphinView* view = m_controller->dolphinView();
+ updateGridSize(view->showPreview(), view->additionalInfo().count());
+}
+