]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/dolphinstatusbar.h
Avoid wrapping text in the status bar
[dolphin.git] / src / statusbar / dolphinstatusbar.h
index 5cb1c4b6044f29e7f219410e92416c976b0736c9..75a2cdc6f0c3020520fbbea2ec6f0388f3284e05 100644 (file)
@@ -7,8 +7,9 @@
 #ifndef DOLPHINSTATUSBAR_H
 #define DOLPHINSTATUSBAR_H
 
+#include "animatedheightwidget.h"
+
 #include <QTime>
-#include <QWidget>
 
 class QUrl;
 class StatusBarSpaceInfo;
@@ -18,6 +19,7 @@ class QToolButton;
 class QSlider;
 class QTimer;
 class KSqueezedTextLabel;
+class QHBoxLayout;
 
 /**
  * @brief Represents the statusbar of a Dolphin view.
@@ -25,7 +27,7 @@ class KSqueezedTextLabel;
  * The statusbar allows to show messages, progress
  * information and space-information of a disk.
  */
-class DolphinStatusBar : public QWidget
+class DolphinStatusBar : public AnimatedHeightWidget
 {
     Q_OBJECT
 
@@ -123,6 +125,9 @@ private:
 
     void updateContentsMargins();
 
+    /** @see AnimatedHeightWidget::preferredHeight() */
+    int preferredHeight() const override;
+
 private:
     QString m_text;
     QString m_defaultText;
@@ -140,6 +145,8 @@ private:
 
     QTimer *m_delayUpdateTimer;
     QTime m_textTimestamp;
+
+    QHBoxLayout *m_topLayout;
 };
 
 #endif