diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-08-26 17:12:45 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-08-26 17:12:45 +0200 |
commit | 735f1774e4c622ea50a4576d180daecfc0698918 (patch) | |
tree | e0d4026e651ce32d0909502942189f196fdeb23f /qutebrowser/mainwindow | |
parent | 6afa00c465327a118dbcff46fa85b6df53037263 (diff) | |
download | qutebrowser-735f1774e4c622ea50a4576d180daecfc0698918.tar.gz qutebrowser-735f1774e4c622ea50a4576d180daecfc0698918.zip |
API stuff
Diffstat (limited to 'qutebrowser/mainwindow')
-rw-r--r-- | qutebrowser/mainwindow/mainwindow.py | 2 | ||||
-rw-r--r-- | qutebrowser/mainwindow/statusbar/command.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index a3e6722af..1d694a45a 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -565,7 +565,7 @@ class MainWindow(QWidget): refresh_window = self.isVisible() if hidden: window_flags |= Qt.WindowType.CustomizeWindowHint | Qt.WindowType.NoDropShadowWindowHint - self.setWindowFlags(cast(Qt.WindowFlags, window_flags)) + self.setWindowFlags(window_flags) if refresh_window: self.show() diff --git a/qutebrowser/mainwindow/statusbar/command.py b/qutebrowser/mainwindow/statusbar/command.py index dbb4a4626..bbcf16c7b 100644 --- a/qutebrowser/mainwindow/statusbar/command.py +++ b/qutebrowser/mainwindow/statusbar/command.py @@ -276,7 +276,7 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit): text = self.text() if not text: text = 'x' - width = self.fontMetrics().width(text) + width = self.fontMetrics().horizontalAdvance(text) return QSize(width, height) @pyqtSlot() |