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

Make overlay::menu accessible #1425

Merged
merged 3 commits into from
Sep 21, 2022
Merged

Make overlay::menu accessible #1425

merged 3 commits into from
Sep 21, 2022

Conversation

0x192
Copy link
Contributor

@0x192 0x192 commented Aug 27, 2022

Implementing pick_list::StyleSheet for a custom Theme requires to also implement menu::StyleSheet which is currently not accessible.

This pull request creates an alias of overlay::menu in the root so you can import it with use iced::overlay::menu.

Fixes #1406

@hecrj hecrj added improvement An internal improvement widget labels Aug 27, 2022
@hecrj hecrj added this to the 0.5.0 milestone Aug 27, 2022
@0x192
Copy link
Contributor Author

0x192 commented Aug 27, 2022

Note sure about the improvement label. It's more of a bugfix than an improvement.

#1362 introduced the theme support allowing to implement a custom style for all widgets except the pick_list because you need to implement menu::stylesheet which is not accessible.

0x192 added a commit to 0x192/universal-android-debloater that referenced this pull request Sep 1, 2022
)

Note: UAD is now temporarily based on my fork of Iced until iced-rs/iced#1425 is merged upstream.

- Remove custom code for theming: UAD now uses the new Iced styling API
- All the code for initializing UAD (download debloat lists, fetch connected devices etc...) is now a lot more streamlined
- Other miscellaneous code improvement
- Replace row() and column() functions by the new Iced vector-like helper functions (row![], column![])
- Move navigation menu GUI code in a dedicated file
- Rework the way UAD uses events for async code
@hecrj hecrj added the bug Something isn't working label Sep 21, 2022
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🎉

@hecrj hecrj merged commit f15bc3c into iced-rs:master Sep 21, 2022
0x192 added a commit to 0x192/universal-android-debloater that referenced this pull request Sep 21, 2022
@0x192
Copy link
Contributor Author

0x192 commented Sep 21, 2022

Thanks to you!

Why did you need to add this? I'm not sure to understand

pub type Element<'a, Message, Renderer = crate::Renderer> =
    iced_native::overlay::Element<'a, Message, Renderer>;

(no problem if you don't have time to answer)

@hecrj
Copy link
Member

hecrj commented Sep 23, 2022

Just figured we should expose overlay::Element as well, since we are exposing overlay::Menu and it is part of its public API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working improvement An internal improvement widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to access menu::Stylesheet
2 participants