From 22ae0c5bca32baabd41a425986823d6f25ea5dd4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 1 Aug 2015 00:26:07 +0200 Subject: [PATCH] Don't call setIconSize if height doesn't change. --- qutebrowser/mainwindow/tabwidget.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 0728de95a..8de7b78d7 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -294,10 +294,10 @@ class TabBar(QTabBar): """Set the tab bar font.""" self.setFont(config.get('fonts', 'tabbar')) - def resizeEvent(self, _s): + def resizeEvent(self, e): """Set the favicon size to the tabbar size minus some padding.""" - height = self.size().height() - if height > 0: + height = e.size().height() + if height != 0 and e.oldSize().height() != height: height = math.ceil(height - height / 7) self.setIconSize(QSize(height, height))