]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/selectionmode/bottombar.cpp
port to KIO::createDefaultJobUiDelegate
[dolphin.git] / src / selectionmode / bottombar.cpp
index 999b24ae47885e46c66f082a903e566f17166cae..af9f9dd0701add6832a065b249967a77e49d7e70 100644 (file)
 #include "backgroundcolorhelper.h"
 #include "global.h"
 
 #include "backgroundcolorhelper.h"
 #include "global.h"
 
-#include <KActionCollection>
-#include <KFileItem>
-#include <KFileItemListProperties>
-#include <KStandardAction>
-
 #include <QGridLayout>
 #include <QResizeEvent>
 #include <QScrollArea>
 #include <QStyle>
 #include <QGridLayout>
 #include <QResizeEvent>
 #include <QScrollArea>
 #include <QStyle>
-#include <QtGlobal>
 #include <QTimer>
 
 using namespace SelectionMode;
 #include <QTimer>
 
 using namespace SelectionMode;
@@ -57,7 +51,7 @@ BottomBar::BottomBar(KActionCollection *actionCollection, QWidget *parent) :
         }
         setVisibleInternal(visible, WithAnimation);
     });
         }
         setVisibleInternal(visible, WithAnimation);
     });
-    connect(m_contentsContainer, &BottomBarContentsContainer::leaveSelectionModeRequested, this, &BottomBar::leaveSelectionModeRequested);
+    connect(m_contentsContainer, &BottomBarContentsContainer::selectionModeLeavingRequested, this, &BottomBar::selectionModeLeavingRequested);
 
     BackgroundColorHelper::instance()->controlBackgroundColor(this);
 }
 
     BackgroundColorHelper::instance()->controlBackgroundColor(this);
 }
@@ -87,7 +81,6 @@ void BottomBar::setVisibleInternal(bool visible, Animated animated)
     m_heightAnimation->setDuration(2 *
             style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, this) *
             GlobalConfig::animationDurationFactor());
     m_heightAnimation->setDuration(2 *
             style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, this) *
             GlobalConfig::animationDurationFactor());
-
     m_heightAnimation->setStartValue(height());
     m_heightAnimation->setEasingCurve(QEasingCurve::OutCubic);
     if (visible) {
     m_heightAnimation->setStartValue(height());
     m_heightAnimation->setEasingCurve(QEasingCurve::OutCubic);
     if (visible) {
@@ -120,7 +113,7 @@ void BottomBar::slotSplitTabDisabled()
     switch (contents()) {
     case CopyToOtherViewContents:
     case MoveToOtherViewContents:
     switch (contents()) {
     case CopyToOtherViewContents:
     case MoveToOtherViewContents:
-        Q_EMIT leaveSelectionModeRequested();
+        Q_EMIT selectionModeLeavingRequested();
     default:
         return;
     }
     default:
         return;
     }
@@ -166,7 +159,7 @@ void BottomBar::resizeEvent(QResizeEvent *resizeEvent)
         return QWidget::resizeEvent(resizeEvent);
     }
 
         return QWidget::resizeEvent(resizeEvent);
     }
 
-    m_contentsContainer->updateForNewWidth();
+    m_contentsContainer->adaptToNewBarWidth(width());
 
     return QWidget::resizeEvent(resizeEvent);
 }
 
     return QWidget::resizeEvent(resizeEvent);
 }