From 3c1b05c81e8ce00ed647001f7623c79f2612b770 Mon Sep 17 00:00:00 2001 From: Yashar Shahi Date: Mon, 10 Jul 2017 18:05:35 +0430 Subject: [PATCH] Show messages longer if there are multiple of them --- qutebrowser/mainwindow/messageview.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qutebrowser/mainwindow/messageview.py b/qutebrowser/mainwindow/messageview.py index 7d0d2b682..382853d11 100644 --- a/qutebrowser/mainwindow/messageview.py +++ b/qutebrowser/mainwindow/messageview.py @@ -100,6 +100,10 @@ class MessageView(QWidget): """Configure self._clear_timer according to the config.""" interval = config.get('ui', 'message-timeout') if interval != 0: + multimpy_by = len(self._messages) + 1 + if multimpy_by > 5: + multimpy_by = 5 + interval *= multimpy_by self._clear_timer.setInterval(interval) @pyqtSlot() @@ -128,6 +132,7 @@ class MessageView(QWidget): self._vbox.addWidget(widget) widget.show() if config.get('ui', 'message-timeout') != 0: + self._set_clear_timer_interval() self._clear_timer.start() self._messages.append(widget) self._last_text = text