diff options
author | Bence Ferdinandy <bence@ferdinandy.com> | 2023-08-02 21:06:47 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-08-03 22:28:07 +0200 |
commit | 2fbce2e2c9aa782cc3d99a7232d78876b835e513 (patch) | |
tree | d3748edf1573b9c460efd729e833fdb8886539b2 /worker/imap/worker.go | |
parent | 6713a8f4588f26f46c3e5fe0a69ead0f345617f3 (diff) | |
download | aerc-2fbce2e2c9aa782cc3d99a7232d78876b835e513.tar.gz |
mouse: fix offset in tab title clickable area
Since templates have been introduced into the tab titles the clickable
area has been offset from the actual title. This is because the
clickable areas are calculated based on the tab names, which can now be
different from the acually shown titles. Extract the logic of getting
the display name of a tab from TabStrip and add as method of Tab. Also
extract the magic constant 32. Use the method and const in both clicked
and Draw. Switch from using len() to runewidth, when calculating the
length of the display name.
Fixes: https://todo.sr.ht/~rjarry/aerc/162
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Diffstat (limited to 'worker/imap/worker.go')
0 files changed, 0 insertions, 0 deletions