macos_ui icon indicating copy to clipboard operation
macos_ui copied to clipboard

Right click popup menu

Open driftwoodstudio opened this issue 10 months ago • 2 comments

Use case

Common feature of desktop apps -- right click to bring up a context menu to set a style, remove an item, add a new item, etc... 1000-and-1 uses.

Without this, default is to use flutter's global showMenu() function which applies a Material style to the entries (spacing them way too far apart for macOS, with no configuration parameters to adjust).

Menu popup buttons are not a workable substitute since (a) they have icons, and (b) they're widgets placed at fixed positions (whereas showMenu() can be done from any point obtained via GestureDector), (c) the Text()/etc widgets added by caller as menu captions are not in proper theme context so don't get the color-per-ThemeMode rendering that other text in a MacosApplication/MacosTheme do.

Proposal

What's needed as an implementation is a fork of the _PopupMenuRoute() crated by the global showMenu function, with changed Theme/capturedThemes() references, reduced forced padding inserted to match Material design guidelines, and proper font color rendering based on MacosTheme.

driftwoodstudio avatar Mar 03 '25 04:03 driftwoodstudio