Tk Source Code

View Ticket
Login
Ticket UUID: 70e531918e6d99cbdd8b527386fec15872c64216
Title: several issues with menubuttons on all platforms
Type: Bug Version: 8.6.9
Submitter: marc_culler Created on: 2019-01-09 14:24:31
Subsystem: 10. Generic Menus Assigned To: marc_culler
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2019-02-02 17:55:22
Resolution: Fixed Closed By: fvogel
    Closed on: 2019-02-02 17:55:22
Description:

There are several problems with the current implementation of menubutton on macOS which are visible in the menubutton demo:

  • The popup menus appear in the wrong place, especially with -direction left, which places the menu too far to the left.
  • The option menus are supposed to place the active item on top of the button. This is not happening. It is not even close in the case of the color palette in the demo. The reason for that is that the mac menus, which are drawn by the Appkit, do not allow for multiple columns. But when menu geometry is computed the columnBreaks are taken into account.
  • Within the menubutton itself, the whitespace at the left of the button is a few pixels larger than that used in native PopUpButtons.
  • All of the tests related to computing the geometry of a menubutton fail, in part because the mac button is an oval, and the round ends are ignored by the tests.

User Comments: fvogel added on 2019-02-02 17:55:22:

TIP #533 was accepted through TCT vote.

I have merged the corresponding implementation into core-8-6-branch and trunk.

Closing this ticket now. Many thanks to Marc Culler!


fvogel added on 2019-01-15 20:46:42:

Marc took my remarks into account and made changes in the bugfix branch.

TIP #533 is now published and needs review.


fvogel added on 2019-01-13 11:23:55:
Prompted by Marc I have reviewed the proposal and will attach my email to him to the present ticket.

marc_culler (claiming to be Marc Culler) added on 2019-01-11 21:11:32:

Apparently the strange appearance of the tearoff entry is intentional, and also forced on Windows by the way that columns are handled. Since no one uses tearoff menus any more, it probably doesn't matter.


marc_culler (claiming to be Marc Culler) added on 2019-01-11 14:28:58:

A little further investigation reveals that menubuttons are broken on all platforms. Running the widget demo on linux or Windows one sees:

  • The Left and Right menus are displayed at the wrong height. They should line up with the buttons.
  • On Windows the Left menu also has the wrong x coordinate, making it cover up part of the button.
  • The color palette option menu is a tearoff but the tearoff entry is not displayed correctly. It is in a column by itself rather than at the top of the menu. In linux it is partly covered by other entries.
  • The color palette does not open to the correct height when a color in the bottom row is selected.


Attachments: