Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: gtk overlay in libcosmic #572

Open
vnuxa opened this issue Aug 12, 2024 · 5 comments
Open

feature request: gtk overlay in libcosmic #572

vnuxa opened this issue Aug 12, 2024 · 5 comments

Comments

@vnuxa
Copy link

vnuxa commented Aug 12, 2024

im making a desktop shell that uses libcosmic, and in the past ive used a desktop shell that depended on gtk
and theres a widget that i noticed i couldn't remake in libcosmic and thats the gtk overlay widget
it would be really nice to have the overlay widget, to have much nicer animations and other cool stuff that you could do with widgets overlayed ontop of each other

with how gtk overlay widgets work, they take the size of the first child and then places the other children on top of each other and wont render outside the overlay, hopefully something similar can be implemented within libcosmic

@mmstick
Copy link
Member

mmstick commented Aug 12, 2024

There are overlay widgets in libcosmic and iced. You can create custom widgets that draw an overlay by using the overlay method of the widget trait. See the context drawer and menu widgets as an example.

@vnuxa
Copy link
Author

vnuxa commented Aug 12, 2024

dont they have just a single child?
what im asking for is a container that overlays multiple children ontop of it
though there might be something that im not getting

@mmstick
Copy link
Member

mmstick commented Aug 12, 2024

An overlay widget attaches to a widget, such as how the context drawer attaches to the application's entire content area beneath the header bar. This overlay widget can draw any number of widgets on top of the widget it is attached to. The context drawer widget places a container on the right side of the window's content area, but custom widgets can draw any number of widgets in their overlay.

@vnuxa
Copy link
Author

vnuxa commented Aug 12, 2024

apparently theres a stack widget in iced 0.13 which is exactly what im describing
thanks for the help though

@mmstick
Copy link
Member

mmstick commented Aug 12, 2024

We are currently rebasing to the latest version of iced, so we should be able to import this soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants