fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design

Home Page:https://fyne.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a type of overlay/popup container that doesn't block interaction with the underlying layer

dweymouth opened this issue · comments

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

Widget.PopUp in both its modal and non-modal variants blocks interaction with the rest of the app below it. This is desirable in most cases but sometimes it is desirable to show an overlay item that doesn't block interaction. This would unlock features such as "error toasts" - displaying an error message to the user in-app in a popup that can be ignored but also x'ed out early, tool tips, among others.

Is it possible to construct a solution with the existing API?

Yes, with the app itself having a stack container as the window content with the main app layer below and a layer for floating overlays above it. This can lead to unclean code though as it leads to widgets or components that need to show a non-blocking overlay to have a reference to the top-level app container, which kind-of breaks encapsulation.

Describe the solution you'd like to see.

Something like widget.NewNonBlockingPopup maybe?