From 9877bef7c56b07e715d1f7a6dddc8529387b689b Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 26 Jan 2007 19:38:32 +0000 Subject: Further optimizations for the status bar: hide the space information if the status bar text does not fit into the remaining width. svn path=/trunk/playground/utils/dolphin/; revision=627486 --- src/dolphinstatusbar.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/dolphinstatusbar.h') diff --git a/src/dolphinstatusbar.h b/src/dolphinstatusbar.h index 445419c3f..e98e9e512 100644 --- a/src/dolphinstatusbar.h +++ b/src/dolphinstatusbar.h @@ -110,15 +110,26 @@ public: void setDefaultText(const QString& text); const QString& defaultText() const { return m_defaultText; } +protected: + /** @see QWidget::resizeEvent() */ + virtual void resizeEvent(QResizeEvent* event); + private slots: void updateProgressInfo(); /** * Is invoked, when the URL of the DolphinView, where the * statusbar belongs too, has been changed. The space information - * is updated. + * content is updated. + */ + void updateSpaceInfoContent(const KUrl& url); + + /** + * Shows the space information if there is enough room to show it + * without the need to clip the status bar text. If the progress + * bar is shown, the space information won't be shown. */ - void updateSpaceInfo(const KUrl& url); + void showSpaceInfo(); private: StatusBarMessageLabel* m_messageLabel; -- cgit v1.3.1