Tk Source Code

View Ticket
Login
2026-10-08
12:39 • Pending ticket [3587262f]: Width of menubutton too short on aqua with textvariable plus 4 other changes artifact: 6409dbac user: serhiy.storchaka
2022-04-04
14:27 • Ticket [29b5c28e] Error when tk_popup used to select a separator entry status still Open with 3 other changes artifact: 5bcc925e user: griffin
2019-02-02
17:55 • Closed ticket [70e53191]: several issues with menubuttons on all platforms plus 6 other changes artifact: 219fee40 user: fvogel
17:52
TIP #533 (Extension of the menu post command) implementation was accepted by TCT vote. This allows fixing of bug [70e531918e]: geometry issues with menubuttons on macOS. check-in: 4b28f745 user: fvogel tags: trunk
17:51
TIP #533 (Extension of the menu post command) implementation was accepted by TCT vote. This allows fixing of bug [70e531918e]: geometry issues with menubuttons on macOS. check-in: d95dc604 user: fvogel tags: core-8-6-branch
2019-01-15
20:46 • Ticket [70e53191] several issues with menubuttons on all platforms status still Open with 3 other changes artifact: d550fc5e user: fvogel
2019-01-13
11:25 • Add attachment Review - fvogel - 13 Jan 2019.txt to ticket [70e53191] artifact: 8cdaeece user: fvogel
11:24 • Ticket [70e53191] several issues with menubuttons on all platforms status still Open with 3 other changes artifact: ac5a3f8d user: fvogel
11:23 • Ticket [70e53191]: 3 changes artifact: bc69b631 user: fvogel
2019-01-11
21:11 • Ticket [70e53191]: 4 changes artifact: 7297a655 user: marc_culler
14:28 • Ticket [70e53191]: 6 changes artifact: d44317c1 user: marc_culler
2019-01-09
14:28
Fix bug [70e531918e]: geometry issues with menubuttons on macOS check-in: 06cc21c0 user: culler tags: bug-70e531918e
14:24 • New ticket [70e53191] several issues with menubuttons on macOS. artifact: ab189b56 user: marc_culler

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: