From 8d7fcf41da756cd1918bd8fa827e85cc5ae80e29 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 16 Nov 2016 22:26:16 +0100 Subject: [PATCH] Set a maximum width for prompts Fixes #2124 --- qutebrowser/mainwindow/mainwindow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index 9e8f5a191..f7d326a09 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -232,8 +232,8 @@ class MainWindow(QWidget): width = self.width() - 2 * padding left = padding else: - width = size_hint.width() - left = (self.width() - size_hint.width()) / 2 if centered else 0 + width = min(size_hint.width(), self.width() - 2 * padding) + left = (self.width() - width) / 2 if centered else 0 height_padding = 20 status_position = config.get('ui', 'status-position')