diff options
| author | Francesco Abbate <francesco.bbt@gmail.com> | 2022-01-20 12:21:59 +0100 |
|---|---|---|
| committer | Francesco Abbate <francesco.bbt@gmail.com> | 2022-01-20 15:22:09 +0100 |
| commit | 84a1f42e0430d40be040080a419335963a4580c9 (patch) | |
| tree | 2c3037ef71cdf0e363a8f3a2aec783dab871b6f0 | |
| parent | 03e51daa7d97644b206f63ec4d1171297783d5b7 (diff) | |
| download | lite-xl-use-tabs-margin-luajit-2.0.tar.gz lite-xl-use-tabs-margin-luajit-2.0.zip | |
Adjust tab text positioning when too largeuse-tabs-margin-luajit-2.0
| -rw-r--r-- | data/core/rootview.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/data/core/rootview.lua b/data/core/rootview.lua index 2419d7a6..afe69d17 100644 --- a/data/core/rootview.lua +++ b/data/core/rootview.lua @@ -566,6 +566,7 @@ function Node:draw_tab(text, is_active, is_hovered, is_close_hovered, x, y, w, h for i = 1, #text do local reduced_text = text:sub(1, #text - i) if style.font:get_width(reduced_text) + dots_width <= text_avail_width then + x = x - padx / 3 -- we half the left padding to draw the text text = reduced_text .. "…" break end |
