client/ui/context menu: fix menu item label spacing issue

This commit is contained in:
Adorian Doran 2026-09-11 19:45:29 +03:00
parent bb4c793a88
commit 56dad66adc
2 changed files with 10 additions and 1 deletions

View File

@ -330,7 +330,10 @@ class ContextMenu {
const $link = $("<span>")
.append($icon)
.append(" &nbsp; ") // some space between icon and text
// An element rather than spaces: a row is a flex line, so text between the icon and the
// title merges with a plain title but is trimmed before a title boxed by `menuName()`,
// leaving the two kinds of row indented differently.
.append($("<span>").addClass("tn-menu-gap"))
.append(item.title);
if ("badges" in item && item.badges) {

View File

@ -1702,6 +1702,12 @@ body.mobile .dropdown-submenu > .dropdown-menu {
-webkit-user-select: none;
}
/* What stands between a menu item's icon and its title. */
.dropdown-item .tn-menu-gap {
flex: none;
width: 0.5em;
}
/* A name the user wrote, boxed by `menuName()`: clipped rather than widening the menu. */
.dropdown-item .tn-menu-name {
display: block;