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 12:22:30 +0100 |
| commit | afe0c5930fce0dbdd892748df3e02cb38a860459 (patch) | |
| tree | 432efe131ceb735932d2d86bfa9d92c78a295808 | |
| parent | a99d1d10be31b7ec2b5c2df5fe19c6710d57bf66 (diff) | |
| download | lite-xl-use-tabs-margin-2.0.tar.gz lite-xl-use-tabs-margin-2.0.zip | |
Adjust tab text positioning when too largeuse-tabs-margin-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 |
