]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/selectionmode/bottombar.cpp
GIT_SILENT made messages (after extraction)
[dolphin.git] / src / selectionmode / bottombar.cpp
index 999b24ae47885e46c66f082a903e566f17166cae..c912dd489185e7f70092c98e1e78d11a8f1d2915 100644 (file)
@@ -9,18 +9,11 @@
 
 #include "bottombarcontentscontainer.h"
 #include "backgroundcolorhelper.h"
-#include "global.h"
-
-#include <KActionCollection>
-#include <KFileItem>
-#include <KFileItemListProperties>
-#include <KStandardAction>
 
 #include <QGridLayout>
 #include <QResizeEvent>
 #include <QScrollArea>
 #include <QStyle>
-#include <QtGlobal>
 #include <QTimer>
 
 using namespace SelectionMode;
@@ -57,7 +50,7 @@ BottomBar::BottomBar(KActionCollection *actionCollection, QWidget *parent) :
         }
         setVisibleInternal(visible, WithAnimation);
     });
-    connect(m_contentsContainer, &BottomBarContentsContainer::leaveSelectionModeRequested, this, &BottomBar::leaveSelectionModeRequested);
+    connect(m_contentsContainer, &BottomBarContentsContainer::selectionModeLeavingRequested, this, &BottomBar::selectionModeLeavingRequested);
 
     BackgroundColorHelper::instance()->controlBackgroundColor(this);
 }
@@ -87,7 +80,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->setStartValue(height());
     m_heightAnimation->setEasingCurve(QEasingCurve::OutCubic);
     if (visible) {
@@ -120,7 +112,7 @@ void BottomBar::slotSplitTabDisabled()
     switch (contents()) {
     case CopyToOtherViewContents:
     case MoveToOtherViewContents:
-        Q_EMIT leaveSelectionModeRequested();
+        Q_EMIT selectionModeLeavingRequested();
     default:
         return;
     }
@@ -166,7 +158,7 @@ void BottomBar::resizeEvent(QResizeEvent *resizeEvent)
         return QWidget::resizeEvent(resizeEvent);
     }
 
-    m_contentsContainer->updateForNewWidth();
+    m_contentsContainer->adaptToNewBarWidth(width());
 
     return QWidget::resizeEvent(resizeEvent);
 }