]> cloud.milkyroute.net Git - dolphin.git/commitdiff
restore zooming functionality
authorPeter Penz <peter.penz19@gmail.com>
Fri, 28 Aug 2009 21:12:46 +0000 (21:12 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Fri, 28 Aug 2009 21:12:46 +0000 (21:12 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1016779

src/dolphincolumnview.cpp
src/dolphincolumnview.h
src/dolphincolumnviewcontainer.cpp
src/dolphincolumnviewcontainer.h

index 4b17c2c9eae952b56caf906bd35c2f6700cff151..14ee18bef739fed628a66b84bda4e58b97947827 100644 (file)
@@ -33,6 +33,7 @@
 #include "selectionmanager.h"
 #include "tooltips/tooltipmanager.h"
 #include "versioncontrolobserver.h"
+#include "zoomlevelinfo.h"
 
 #include <kcolorscheme.h>
 #include <kdirlister.h>
@@ -167,7 +168,11 @@ DolphinColumnView::DolphinColumnView(QWidget* parent,
 
     new VersionControlObserver(this);*/
 
-    updateDecorationSize(m_container->m_controller->dolphinView()->showPreview());
+    DolphinController* controller = m_container->m_controller;
+    connect(controller, SIGNAL(zoomLevelChanged(int)),
+            this, SLOT(setZoomLevel(int)));
+
+    updateDecorationSize(dolphinView->showPreview());
 }
 
 DolphinColumnView::~DolphinColumnView()
@@ -453,6 +458,22 @@ void DolphinColumnView::currentChanged(const QModelIndex& current, const QModelI
     m_autoScroller->handleCurrentIndexChange(current, previous);
 }
 
+
+void DolphinColumnView::setZoomLevel(int level)
+{
+    const int size = ZoomLevelInfo::iconSizeForZoomLevel(level);
+    ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
+
+    const bool showPreview = m_container->m_controller->dolphinView()->showPreview();
+    if (showPreview) {
+        settings->setPreviewSize(size);
+    } else {
+        settings->setIconSize(size);
+    }
+
+    updateDecorationSize(showPreview);
+}
+
 void DolphinColumnView::slotEntered(const QModelIndex& index)
 {
     m_container->m_controller->setItemView(this);
index 91624db2e58983c0faaf16f8abdf5a8a7703fc59..642dfaeaf8648f639675a7f598b9bda4142b7bb5 100644 (file)
@@ -104,6 +104,8 @@ protected:
     virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous);
 
 private slots:
+    void setZoomLevel(int level);
+
     void slotEntered(const QModelIndex& index);
     void requestActivation();
     void updateFont();
index dd7ee1c9c4e44f9eed5edcaccf2ef2f201e7c7fb..2428213012465a40e4db48aee68bb12fde8e5cb8 100644 (file)
@@ -23,7 +23,6 @@
 #include "dolphincontroller.h"
 #include "dolphinsortfilterproxymodel.h"
 #include "settings/dolphinsettings.h"
-#include "zoomlevelinfo.h"
 
 #include "dolphin_columnmodesettings.h"
 
@@ -53,8 +52,6 @@ DolphinColumnViewContainer::DolphinColumnViewContainer(QWidget* parent, DolphinC
 
     connect(this, SIGNAL(viewportEntered()),
             controller, SLOT(emitViewportEntered()));
-    connect(controller, SIGNAL(zoomLevelChanged(int)),
-            this, SLOT(setZoomLevel(int)));
     connect(controller, SIGNAL(activationChanged(bool)),
             this, SLOT(updateColumnsBackground(bool)));
 
@@ -221,19 +218,6 @@ void DolphinColumnViewContainer::wheelEvent(QWheelEvent* event)
     }
 }
 
-void DolphinColumnViewContainer::setZoomLevel(int level)
-{
-    const int size = ZoomLevelInfo::iconSizeForZoomLevel(level);
-    ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
-
-    const bool showPreview = m_controller->dolphinView()->showPreview();
-    if (showPreview) {
-        settings->setPreviewSize(size);
-    } else {
-        settings->setIconSize(size);
-    }
-}
-
 void DolphinColumnViewContainer::moveContentHorizontally(int x)
 {
     m_contentX = isRightToLeft() ? +x : -x;
index 3d593ddbd0d4ec44ed568c62cf3e9abdaf5dfcca..c4030657a79214e3afe40e4907642ea1458f1223 100644 (file)
@@ -82,8 +82,6 @@ protected:
     virtual void wheelEvent(QWheelEvent* event);
 
 private slots:
-    void setZoomLevel(int level);
-
     /**
      * Moves the content of the columns view to represent
      * the scrollbar position \a x.