Apply tabs.min_width to all tabs when tabs are unshrunk
This commit is contained in:
parent
1672995639
commit
996561b50e
@ -1411,11 +1411,14 @@ tabs.min_width:
|
||||
type:
|
||||
name: Int
|
||||
minval: -1
|
||||
maxval: maxint
|
||||
desc: >-
|
||||
Minimum width (in pixels) of tabs (-1 to use text contents for min width).
|
||||
Minimum width (in pixels) of tabs (-1 to use min text contents size for min width).
|
||||
|
||||
This setting only applies when tabs are horizontal.
|
||||
|
||||
This setting does not apply to pinned tabs, unless `tabs.pinned.shrink` is False.
|
||||
|
||||
tabs.width.indicator:
|
||||
renamed: tabs.indicator.width
|
||||
|
||||
|
@ -359,7 +359,8 @@ class TabBar(QTabBar):
|
||||
if option in ["tabs.indicator.padding",
|
||||
"tabs.padding",
|
||||
"tabs.indicator.width",
|
||||
"tabs.min_width"]:
|
||||
"tabs.min_width",
|
||||
"tabs.pinned.shrink"]:
|
||||
self._minimum_tab_size_hint_helper.cache_clear()
|
||||
|
||||
def _on_show_switching_delay_changed(self):
|
||||
@ -529,7 +530,8 @@ class TabBar(QTabBar):
|
||||
width = (text_width + icon_width +
|
||||
padding_h + indicator_width)
|
||||
min_width = config.val.tabs.min_width
|
||||
if not pinned and not self.vertical and min_width > 0:
|
||||
if (not self.vertical and min_width > 0 and
|
||||
not pinned or not config.val.tabs.pinned.shrink):
|
||||
width = max(min_width, width)
|
||||
return QSize(width, height)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user