more stylish tabs (#95)
This commit is contained in:
parent
b612357371
commit
3af6af654b
|
@ -403,11 +403,13 @@ function Node:draw_tabs()
|
||||||
local x, y, w, h = self:get_tab_rect(i)
|
local x, y, w, h = self:get_tab_rect(i)
|
||||||
local text = view:get_name()
|
local text = view:get_name()
|
||||||
local color = style.dim
|
local color = style.dim
|
||||||
renderer.draw_rect(x + w, y, ds, h, style.divider)
|
local padding_y = style.padding.y
|
||||||
renderer.draw_rect(x - ds, y, ds, h, style.divider)
|
renderer.draw_rect(x + w, y + padding_y, ds, h - padding_y * 2, style.dim)
|
||||||
if view == self.active_view then
|
if view == self.active_view then
|
||||||
color = style.text
|
color = style.text
|
||||||
renderer.draw_rect(x, y, w, h, style.background)
|
renderer.draw_rect(x, y, w, h, style.background)
|
||||||
|
renderer.draw_rect(x + w, y, ds, h, style.divider)
|
||||||
|
renderer.draw_rect(x - ds, y, ds, h, style.divider)
|
||||||
end
|
end
|
||||||
local cx, cw, cspace = close_button_location(x, w)
|
local cx, cw, cspace = close_button_location(x, w)
|
||||||
local show_close_button = (view == self.active_view or i == self.hovered_tab)
|
local show_close_button = (view == self.active_view or i == self.hovered_tab)
|
||||||
|
|
Loading…
Reference in New Issue