Ticket #3085 (closed defect: wontfix)

Opened 11 years ago

Last modified 10 years ago

Dropdown menu is not centered

Reported by: egmont Owned by:
Priority: minor Milestone:
Component: mc-core Version: 4.8.10
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

F9 -> Left (or File, Command, Right)

The dropdown menu's content isn't centered, it has a space on the left but not on the right, e.g.
| Quick view C-x q|
Notice there's a space before "Quick view", but not after "C-x q".

F9 -> Options

One space on the left, two spaces on the right.

Attachments

mc-4.8.10-menu-width-ticket-3085.patch (4.7 KB) - added by egmont 11 years ago.
fix

Change History

Changed 11 years ago by egmont

fix

comment:1 Changed 11 years ago by egmont

Notes:

max_hotkey_len was incorrectly named, it's the length of the text label, not the hotkey. I just renamed the variable and fixed the comment, didn't change the behavior here.

max_entry_len contained the length without the two spaces between the text labels and the shortcut. Now it includes these two spaces too, unless no shortcuts are used.

The mouse x coordinates were a bit off, usually the left border was also valid but the right border wasn't, unless the menu was pushed to the left because of a narrow terminal, in which case the right border belonged to the entry and the left didn't. I've fixed it so that neither of them belongs to the menu entry anymore.

comment:2 in reply to: ↑ description Changed 11 years ago by andrew_b

Replying to egmont:

F9 -> Left (or File, Command, Right)

The dropdown menu's content isn't centered, it has a space on the left but not on the right, e.g.
| Quick view C-x q|

The left one-symbol space is matched with menu_entry_t::first_letter. Currently it's unused (seems it wasn't used ever). Probably it can be useful in the future to mark active menu item. For example:

▕ ✓File listing          ▕
▕  Quick view       C-x q▕
▕  Info             C-x i▕
▕  Tree                  ▕
▕  File listing          ▕
▕  Quick view       C-x q▕
▕ ✓Info             C-x i▕
▕  Tree                  ▕

But currently menu doesn't support checked items and I think we just can remove the menu_entry_t::first_letter field.

comment:3 Changed 10 years ago by egmont

Good point. Looks the menus of graphical menus is often uncentered too for the same reason.
Feel free to close as invalid/wontfix if you wish.

comment:4 Changed 10 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone Future Releases deleted
Note: See TracTickets for help on using tickets.