fix line length
This commit is contained in:
parent
4b2bf12efa
commit
68f172558b
@ -522,20 +522,22 @@ class TabBar(QTabBar):
|
|||||||
width = tab_width_pinned_conf
|
width = tab_width_pinned_conf
|
||||||
else:
|
else:
|
||||||
|
|
||||||
# If we *do* have enough space, tabs should occupy the whole window
|
# If we *do* have enough space, tabs should occupy the whole
|
||||||
# width. If there are pinned tabs their size will be subtracted
|
# window # width. If there are pinned tabs their size will be
|
||||||
# from the total window width.
|
# subtracted from the total window width.
|
||||||
# During shutdown the self.count goes down,
|
# During shutdown the self.count goes down,
|
||||||
# but the self.pinned_count not - this generates some odd behavior.
|
# but the self.pinned_count not - this generates some odd
|
||||||
# To avoid this we compare self.count against self.pinned_count.
|
# behavior. To avoid this we compare self.count against
|
||||||
|
# self.pinned_count.
|
||||||
if self.pinned_count > 0 and no_pinned_count > 0:
|
if self.pinned_count > 0 and no_pinned_count > 0:
|
||||||
width = no_pinned_width / no_pinned_count
|
width = no_pinned_width / no_pinned_count
|
||||||
else:
|
else:
|
||||||
width = self.width() / self.count()
|
width = self.width() / self.count()
|
||||||
|
|
||||||
# If no_pinned_width is not divisible by no_pinned_count, add a pixel to some tabs so
|
# If no_pinned_width is not divisible by no_pinned_count, add a
|
||||||
# that there is no ugly leftover space.
|
# pixel to some tabs so # that there is no ugly leftover space.
|
||||||
if no_pinned_count > 0 and index < no_pinned_width % no_pinned_count:
|
if no_pinned_count > 0 and
|
||||||
|
index < no_pinned_width % no_pinned_count:
|
||||||
width += 1
|
width += 1
|
||||||
|
|
||||||
size = QSize(width, height)
|
size = QSize(width, height)
|
||||||
|
Loading…
Reference in New Issue
Block a user