Don't call setIconSize if height doesn't change.
This commit is contained in:
parent
2c716dbf6c
commit
22ae0c5bca
@ -294,10 +294,10 @@ class TabBar(QTabBar):
|
|||||||
"""Set the tab bar font."""
|
"""Set the tab bar font."""
|
||||||
self.setFont(config.get('fonts', 'tabbar'))
|
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."""
|
"""Set the favicon size to the tabbar size minus some padding."""
|
||||||
height = self.size().height()
|
height = e.size().height()
|
||||||
if height > 0:
|
if height != 0 and e.oldSize().height() != height:
|
||||||
height = math.ceil(height - height / 7)
|
height = math.ceil(height - height / 7)
|
||||||
self.setIconSize(QSize(height, height))
|
self.setIconSize(QSize(height, height))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user