From 183a5910de338ebfef3656d5c27abfd48fbabb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Wi=C3=9Fmann?= Date: Mon, 17 Aug 2015 15:22:08 +0200 Subject: [PATCH] Fix progressbar height to statusbar height. Formerly, the statusbar height changed when the progressbar was visible. This was caused by the default font-size of the progressbar text (though invisible). Overriding the minimumSizeHint() method ignores the font-size of the hidden text and the statusbar height does not change anymore. This fixes the first issue of #886. --- qutebrowser/mainwindow/statusbar/progress.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qutebrowser/mainwindow/statusbar/progress.py b/qutebrowser/mainwindow/statusbar/progress.py index 6d52455d7..a1382d465 100644 --- a/qutebrowser/mainwindow/statusbar/progress.py +++ b/qutebrowser/mainwindow/statusbar/progress.py @@ -79,5 +79,9 @@ class Progress(QProgressBar): def sizeHint(self): """Set the height to the text height plus some padding.""" width = super().sizeHint().width() - height = self.fontMetrics().height() + 3 + height = self.fontMetrics().height() return QSize(width, height) + + def minimumSizeHint(self): + """Set the height to the text height plus some padding.""" + return self.sizeHint()