Merge remote-tracking branch 'origin/pr/3261'
This commit is contained in:
commit
74af52a0c0
@ -231,7 +231,6 @@
|
||||
|<<tabs.close_mouse_button_on_bar,tabs.close_mouse_button_on_bar>>|How to behave when the close mouse button is pressed on the tab bar.
|
||||
|<<tabs.favicons.scale,tabs.favicons.scale>>|Scaling factor for favicons in the tab bar.
|
||||
|<<tabs.favicons.show,tabs.favicons.show>>|Show favicons in the tab bar.
|
||||
|<<tabs.indicator_padding,tabs.indicator_padding>>|Padding (in pixels) for tab indicators.
|
||||
|<<tabs.last_close,tabs.last_close>>|How to behave when the last tab is closed.
|
||||
|<<tabs.mousewheel_switching,tabs.mousewheel_switching>>|Switch between tabs using the mouse wheel.
|
||||
|<<tabs.new_position.related,tabs.new_position.related>>|Position of new tabs opened from another tab.
|
||||
@ -245,8 +244,9 @@
|
||||
|<<tabs.title.alignment,tabs.title.alignment>>|Alignment of the text inside of tabs.
|
||||
|<<tabs.title.format,tabs.title.format>>|Format to use for the tab title.
|
||||
|<<tabs.title.format_pinned,tabs.title.format_pinned>>|Format to use for the tab title for pinned tabs. The same placeholders like for `tabs.title.format` are defined.
|
||||
|<<tabs.width.bar,tabs.width.bar>>|Width (in pixels or as percentage of the window) of the tab bar if it's vertical.
|
||||
|<<tabs.width.indicator,tabs.width.indicator>>|Width (in pixels) of the progress indicator (0 to disable).
|
||||
|<<tabs.width,tabs.width>>|Width (in pixels or as percentage of the window) of the tab bar if it's vertical.
|
||||
|<<tabs.indicator.width,tabs.indicator.width>>|Width (in pixels) of the progress indicator (0 to disable).
|
||||
|<<tabs.indicator.padding,tabs.indicator.padding>>|Padding (in pixels) for tab indicators.
|
||||
|<<tabs.wrap,tabs.wrap>>|Wrap when changing tabs.
|
||||
|<<url.auto_search,url.auto_search>>|What search to start when something else than a URL is entered.
|
||||
|<<url.default_page,url.default_page>>|Page to open if :open -t/-b/-w is used without URL.
|
||||
|
@ -1196,15 +1196,6 @@ tabs.favicons.show:
|
||||
type: Bool
|
||||
desc: Show favicons in the tab bar.
|
||||
|
||||
tabs.indicator_padding:
|
||||
default:
|
||||
top: 2
|
||||
bottom: 2
|
||||
left: 0
|
||||
right: 4
|
||||
type: Padding
|
||||
desc: Padding (in pixels) for tab indicators.
|
||||
|
||||
tabs.last_close:
|
||||
default: ignore
|
||||
type:
|
||||
@ -1330,6 +1321,9 @@ tabs.title.format_pinned:
|
||||
like for `tabs.title.format` are defined.
|
||||
|
||||
tabs.width.bar:
|
||||
renamed: tabs.width
|
||||
|
||||
tabs.width:
|
||||
default: 20%
|
||||
type:
|
||||
name: PercOrInt
|
||||
@ -1340,12 +1334,27 @@ tabs.width.bar:
|
||||
it's vertical."
|
||||
|
||||
tabs.width.indicator:
|
||||
renamed: tabs.indicator.width
|
||||
|
||||
tabs.indicator.width:
|
||||
default: 3
|
||||
type:
|
||||
name: Int
|
||||
minval: 0
|
||||
desc: Width (in pixels) of the progress indicator (0 to disable).
|
||||
|
||||
tabs.indicator_padding:
|
||||
renamed: tabs.indicator.padding
|
||||
|
||||
tabs.indicator.padding:
|
||||
default:
|
||||
top: 2
|
||||
bottom: 2
|
||||
left: 0
|
||||
right: 4
|
||||
type: Padding
|
||||
desc: Padding (in pixels) for tab indicators.
|
||||
|
||||
tabs.width.pinned:
|
||||
deleted: true
|
||||
|
||||
|
@ -353,9 +353,9 @@ class TabBar(QTabBar):
|
||||
self.update()
|
||||
|
||||
# Clear _minimum_tab_size_hint_helper cache when appropriate
|
||||
if option in ["tabs.indicator_padding",
|
||||
if option in ["tabs.indicator.padding",
|
||||
"tabs.padding",
|
||||
"tabs.width.indicator"]:
|
||||
"tabs.indicator.width"]:
|
||||
self._minimum_tab_size_hint_helper.cache_clear()
|
||||
|
||||
def _on_show_switching_delay_changed(self):
|
||||
@ -508,8 +508,8 @@ class TabBar(QTabBar):
|
||||
text_width = min(_text_to_width(text),
|
||||
_text_to_width(tab_text))
|
||||
padding = config.val.tabs.padding
|
||||
indicator_width = config.val.tabs.width.indicator
|
||||
indicator_padding = config.val.tabs.indicator_padding
|
||||
indicator_width = config.val.tabs.indicator.width
|
||||
indicator_padding = config.val.tabs.indicator.padding
|
||||
padding_h = padding.left + padding.right
|
||||
# Only add padding if indicator exists
|
||||
if indicator_width != 0:
|
||||
@ -550,7 +550,7 @@ class TabBar(QTabBar):
|
||||
minimum_size = self.minimumTabSizeHint(index)
|
||||
height = minimum_size.height()
|
||||
if self.vertical:
|
||||
confwidth = str(config.val.tabs.width.bar)
|
||||
confwidth = str(config.val.tabs.width)
|
||||
if confwidth.endswith('%'):
|
||||
main_window = objreg.get('main-window', scope='window',
|
||||
window=self._win_id)
|
||||
@ -826,7 +826,7 @@ class TabBarStyle(QCommonStyle):
|
||||
A Layout object with two QRects.
|
||||
"""
|
||||
padding = config.val.tabs.padding
|
||||
indicator_padding = config.val.tabs.indicator_padding
|
||||
indicator_padding = config.val.tabs.indicator.padding
|
||||
|
||||
text_rect = QRect(opt.rect)
|
||||
if not text_rect.isValid():
|
||||
@ -837,7 +837,7 @@ class TabBarStyle(QCommonStyle):
|
||||
text_rect.adjust(padding.left, padding.top, -padding.right,
|
||||
-padding.bottom)
|
||||
|
||||
indicator_width = config.val.tabs.width.indicator
|
||||
indicator_width = config.val.tabs.indicator.width
|
||||
if indicator_width == 0:
|
||||
indicator_rect = QRect()
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user