]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
Fix mouse back/forward buttons
[dolphin.git] / src / views / dolphinview.cpp
index f102e9acb1a6a9905643a85379715b10415d660e..167f88c39b93b57d51d7fb68ed421c04eb3d3384 100644 (file)
@@ -134,6 +134,9 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) :
     connect(controller, &KItemListController::escapePressed, this, &DolphinView::stopLoading);
     connect(controller, &KItemListController::modelChanged, this, &DolphinView::slotModelChanged);
     connect(controller, &KItemListController::selectedItemTextPressed, this, &DolphinView::slotSelectedItemTextPressed);
+    connect(controller, &KItemListController::increaseZoom, this, &DolphinView::slotIncreaseZoom);
+    connect(controller, &KItemListController::decreaseZoom, this, &DolphinView::slotDecreaseZoom);
+    connect(controller, &KItemListController::swipeUp, this, &DolphinView::slotSwipeUp);
 
     connect(m_model, &KFileItemModel::directoryLoadingStarted,       this, &DolphinView::slotDirectoryLoadingStarted);
     connect(m_model, &KFileItemModel::directoryLoadingCompleted,     this, &DolphinView::slotDirectoryLoadingCompleted);
@@ -1498,6 +1501,8 @@ void DolphinView::hideToolTip(const ToolTipManager::HideBehavior behavior)
     if (GeneralSettings::showToolTips()) {
         m_toolTipManager->hideToolTip(behavior);
     }
+#else
+        Q_UNUSED(behavior)
 #endif
 }
 
@@ -1954,3 +1959,18 @@ void DolphinView::copyPathToClipboard()
     }
     clipboard->setText(path);
 }
+
+void DolphinView::slotIncreaseZoom()
+{
+    setZoomLevel(zoomLevel() + 1);
+}
+
+void DolphinView::slotDecreaseZoom()
+{
+    setZoomLevel(zoomLevel() - 1);
+}
+
+void DolphinView::slotSwipeUp()
+{
+    emit goUpRequested();
+}