Use all the available space for tabs
Use a tab's width larger than style.tab_width if there is enough available space to display the number of tabs specified in config.max_tabs.
This commit is contained in:
parent
ca05562cc0
commit
a92d15fe30
|
@ -466,9 +466,9 @@ end
|
||||||
|
|
||||||
|
|
||||||
function Node:target_tab_width()
|
function Node:target_tab_width()
|
||||||
local tabs_number = self:get_visible_tabs_number()
|
local n = self:get_visible_tabs_number()
|
||||||
local sbw = get_scroll_button_width()
|
local w = self.size.x - get_scroll_button_width() * 2
|
||||||
return math.min(style.tab_width, (self.size.x - sbw * 2) / tabs_number)
|
return common.clamp(style.tab_width, w / config.max_tabs, w / n)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue