Ticket #2199 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

[Patch] Buttonbar mouseclicks are off

Reported by: egmont Owned by: zaytsev
Priority: major Milestone: 4.7.3
Component: mc-core Version:
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master committed-stable



Case 1: Make the terminal window 85 characters wide. Click (with the mouse) on the right side of the "Copy" button on the bottom. See the Move dialog appearing instead of the Copy dialog.

Case 2: Make the terminal 42 characters wide. Click on the bottom right corner (the Re~ov button). MC invokes its menu or quits, depending on the exact click location.

There's some clever logic with displaying the bottom buttons. If the terminal window is narrower than 70 columns, each button gets 7 characters and some buttons will simply not appear at all. If the terminal window is bigger than 70 columns, but not dividable by 10, the first couple of buttons get slightly bigger than the last ones. Unfortunately, the code that handles mouse clicks does not know anything about these, it uses its own, completely different algorithm trying to figure out on which button the user clicked.

Aesthetic issue:

Resize the window to have 85 columns. Notice that the main middle vertical line (the one between the two panels), and the middle vertical line of the button bar (the one between the Copy and Move buttons) totally do not line up vertically. It's not a bug at all, but once you happen to spot it, it really looks ugly.

See the patch that solves all these. The extra space is not assigned to the first buttons, but distributed mostly evenly across buttons, guaranteeing that the first five get exactly as much (or one character less) than the second five, just as it works for the panels. Also, mouse clicks use the exact same boundaries that were used when printing the buttons.


mc- (4.2 KB) - added by egmont 9 years ago.

Change History

Changed 9 years ago by egmont


comment:1 Changed 9 years ago by egmont

Patch just replaced with a second version. In the first version, it was possible that when you made the whole window wider, one of the buttons just went narrower, which looked awful. The new version is more explicit on which buttons should be wider.

comment:2 Changed 9 years ago by egmont

  • Summary changed from Buttonbar mouseclicks are off to [Patch] Buttonbar mouseclicks are off

comment:3 Changed 9 years ago by egmont

  • Priority changed from minor to major
  • Version changed from to

Friendly ping...

This is a very very stupid bug, present in the main page of mc. You click on the Copy button and you get the Move file dialog. Arghhhh... Patch is attached. I think this should really make it into the next stable release! Please...

comment:4 Changed 9 years ago by zaytsev

  • severity changed from no branch to on review
  • Milestone changed from 4.7 to 4.7.3

Branch: 2199_button_bar_mouse (parent: master)
Changeset: a21f42fc1b3f69c2b8b6e674ca75ace67e092a94

comment:5 Changed 9 years ago by slavazanko

  • Owner set to zaytsev
  • Status changed from new to assigned
  • Votes for changeset set to slavazanko
  • Keywords stable-candidate added

In stable branch this bug present too.

comment:6 Changed 9 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il
  • severity changed from on review to approved

please don't forget squash commits before merge. :)

comment:7 Changed 9 years ago by zaytsev

  • Votes for changeset changed from slavazanko angel_il to committed-master
  • severity changed from approved to merged

Committed to master. Merge changeset: 00d69af63f18d0e38501ec0325bd7f17cedf3ee4.

comment:8 Changed 9 years ago by zaytsev

  • Keywords stable-candidate removed
  • Status changed from assigned to testing
  • Votes for changeset changed from committed-master to committed-master committed-stable
  • Resolution set to fixed

Cherry-picked to 4.7.0-stable, changeset: 4e01658e9591bd075911fc341b7b5ce6f3d092ac.

comment:9 Changed 9 years ago by zaytsev

comment:10 Changed 9 years ago by zaytsev

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.