]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/dolphinstatusbar.cpp
Allow folder creation on desktop via F10 shortcut
[dolphin.git] / src / statusbar / dolphinstatusbar.cpp
index 8a81960af20ac7ffdcac5b18803f39b47efcb206..ecdb8f0fa6548ece0769f7568de9b996dea1f77e 100644 (file)
@@ -1,21 +1,8 @@
-/***************************************************************************
- *   Copyright (C) 2006-2012 by Peter Penz <peter.penz19@gmail.com>        *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
- ***************************************************************************/
+/*
+ * SPDX-FileCopyrightText: 2006-2012 Peter Penz <peter.penz19@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #include "dolphinstatusbar.h"
 
@@ -115,7 +102,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
 
     m_zoomSlider->setMaximumWidth(fontMetrics.averageCharWidth() * 25);
 
-    m_spaceInfo->setFixedHeight(zoomSliderHeight);
+    m_spaceInfo->setFixedHeight(contentHeight);
     m_spaceInfo->setMaximumWidth(fontMetrics.averageCharWidth() * 25);
     m_spaceInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
 
@@ -229,7 +216,9 @@ QString DolphinStatusBar::defaultText() const
 
 void DolphinStatusBar::setUrl(const QUrl& url)
 {
-    m_spaceInfo->setUrl(url);
+    if (GeneralSettings::showSpaceInfo()) {
+        m_spaceInfo->setUrl(url);
+    }
 }
 
 QUrl DolphinStatusBar::url() const
@@ -332,6 +321,7 @@ void DolphinStatusBar::setExtensionsVisible(bool visible)
         showSpaceInfo = GeneralSettings::showSpaceInfo();
         showZoomSlider = GeneralSettings::showZoomSlider();
     }
+    m_spaceInfo->setShown(showSpaceInfo);
     m_spaceInfo->setVisible(showSpaceInfo);
     m_zoomSlider->setVisible(showZoomSlider);
 }