change the code for the renamed preferences
This commit is contained in:
parent
7cc3fb4a4e
commit
785bf24652
@ -231,7 +231,7 @@
|
|||||||
|<<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.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.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.favicons.show,tabs.favicons.show>>|Show favicons in the tab bar.
|
||||||
|<<tabs.indicator_padding,tabs.indicator_padding>>|Padding (in pixels) for tab indicators.
|
|<<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.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.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.
|
|<<tabs.new_position.related,tabs.new_position.related>>|Position of new tabs opened from another tab.
|
||||||
@ -245,8 +245,8 @@
|
|||||||
|<<tabs.title.alignment,tabs.title.alignment>>|Alignment of the text inside of tabs.
|
|<<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,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.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,tabs.width>>|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.indicator.width,tabs.indicator.width>>|Width (in pixels) of the progress indicator (0 to disable).
|
||||||
|<<tabs.wrap,tabs.wrap>>|Wrap when changing tabs.
|
|<<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.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.
|
|<<url.default_page,url.default_page>>|Page to open if :open -t/-b/-w is used without URL.
|
||||||
|
@ -1197,13 +1197,16 @@ tabs.favicons.show:
|
|||||||
desc: Show favicons in the tab bar.
|
desc: Show favicons in the tab bar.
|
||||||
|
|
||||||
tabs.indicator_padding:
|
tabs.indicator_padding:
|
||||||
|
renamed: tabs.indicator.padding
|
||||||
|
|
||||||
|
tabs.indicator.padding:
|
||||||
default:
|
default:
|
||||||
top: 2
|
top: 2
|
||||||
bottom: 2
|
bottom: 2
|
||||||
left: 0
|
left: 0
|
||||||
right: 4
|
right: 4
|
||||||
type: Padding
|
type: Padding
|
||||||
desc: Padding (in pixels) for tab indicators.
|
desc: Padding for tab indicators
|
||||||
|
|
||||||
tabs.last_close:
|
tabs.last_close:
|
||||||
default: ignore
|
default: ignore
|
||||||
@ -1330,6 +1333,9 @@ tabs.title.format_pinned:
|
|||||||
like for `tabs.title.format` are defined.
|
like for `tabs.title.format` are defined.
|
||||||
|
|
||||||
tabs.width.bar:
|
tabs.width.bar:
|
||||||
|
renamed: tabs.width
|
||||||
|
|
||||||
|
tabs.width:
|
||||||
default: 20%
|
default: 20%
|
||||||
type:
|
type:
|
||||||
name: PercOrInt
|
name: PercOrInt
|
||||||
@ -1340,11 +1346,14 @@ tabs.width.bar:
|
|||||||
it's vertical."
|
it's vertical."
|
||||||
|
|
||||||
tabs.width.indicator:
|
tabs.width.indicator:
|
||||||
|
renamed: tabs.indicator.width
|
||||||
|
|
||||||
|
tabs.indicator.width:
|
||||||
default: 3
|
default: 3
|
||||||
type:
|
type:
|
||||||
name: Int
|
name: Int
|
||||||
minval: 0
|
minval: 0
|
||||||
desc: Width (in pixels) of the progress indicator (0 to disable).
|
desc: Width of the progress indicator (0 to disable).
|
||||||
|
|
||||||
tabs.width.pinned:
|
tabs.width.pinned:
|
||||||
deleted: true
|
deleted: true
|
||||||
|
@ -353,9 +353,9 @@ class TabBar(QTabBar):
|
|||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# Clear _minimum_tab_size_hint_helper cache when appropriate
|
# Clear _minimum_tab_size_hint_helper cache when appropriate
|
||||||
if option in ["tabs.indicator_padding",
|
if option in ["tabs.indicator.padding",
|
||||||
"tabs.padding",
|
"tabs.padding",
|
||||||
"tabs.width.indicator"]:
|
"tabs.indicator.width"]:
|
||||||
self._minimum_tab_size_hint_helper.cache_clear()
|
self._minimum_tab_size_hint_helper.cache_clear()
|
||||||
|
|
||||||
def _on_show_switching_delay_changed(self):
|
def _on_show_switching_delay_changed(self):
|
||||||
@ -508,8 +508,8 @@ class TabBar(QTabBar):
|
|||||||
text_width = min(_text_to_width(text),
|
text_width = min(_text_to_width(text),
|
||||||
_text_to_width(tab_text))
|
_text_to_width(tab_text))
|
||||||
padding = config.val.tabs.padding
|
padding = config.val.tabs.padding
|
||||||
indicator_width = config.val.tabs.width.indicator
|
indicator_width = config.val.tabs.indicator.width
|
||||||
indicator_padding = config.val.tabs.indicator_padding
|
indicator_padding = config.val.tabs.indicator.padding
|
||||||
padding_h = padding.left + padding.right
|
padding_h = padding.left + padding.right
|
||||||
# Only add padding if indicator exists
|
# Only add padding if indicator exists
|
||||||
if indicator_width != 0:
|
if indicator_width != 0:
|
||||||
@ -550,7 +550,7 @@ class TabBar(QTabBar):
|
|||||||
minimum_size = self.minimumTabSizeHint(index)
|
minimum_size = self.minimumTabSizeHint(index)
|
||||||
height = minimum_size.height()
|
height = minimum_size.height()
|
||||||
if self.vertical:
|
if self.vertical:
|
||||||
confwidth = str(config.val.tabs.width.bar)
|
confwidth = str(config.val.tabs.width)
|
||||||
if confwidth.endswith('%'):
|
if confwidth.endswith('%'):
|
||||||
main_window = objreg.get('main-window', scope='window',
|
main_window = objreg.get('main-window', scope='window',
|
||||||
window=self._win_id)
|
window=self._win_id)
|
||||||
@ -826,7 +826,7 @@ class TabBarStyle(QCommonStyle):
|
|||||||
A Layout object with two QRects.
|
A Layout object with two QRects.
|
||||||
"""
|
"""
|
||||||
padding = config.val.tabs.padding
|
padding = config.val.tabs.padding
|
||||||
indicator_padding = config.val.tabs.indicator_padding
|
indicator_padding = config.val.tabs.indicator.padding
|
||||||
|
|
||||||
text_rect = QRect(opt.rect)
|
text_rect = QRect(opt.rect)
|
||||||
if not text_rect.isValid():
|
if not text_rect.isValid():
|
||||||
@ -837,7 +837,7 @@ class TabBarStyle(QCommonStyle):
|
|||||||
text_rect.adjust(padding.left, padding.top, -padding.right,
|
text_rect.adjust(padding.left, padding.top, -padding.right,
|
||||||
-padding.bottom)
|
-padding.bottom)
|
||||||
|
|
||||||
indicator_width = config.val.tabs.width.indicator
|
indicator_width = config.val.tabs.indicator.width
|
||||||
if indicator_width == 0:
|
if indicator_width == 0:
|
||||||
indicator_rect = QRect()
|
indicator_rect = QRect()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user