Skip to content

Right click popup menuΒ #560

@driftwoodstudio

Description

@driftwoodstudio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions