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

add align option to modal #161

Merged
merged 5 commits into from
Jul 31, 2023
Merged

Conversation

wiiznokes
Copy link
Contributor

No description provided.

@wiiznokes
Copy link
Contributor Author

there seems to be a problem with the use of iced_widget::core::aligment. It will be better to use directly iced::alignment but i don't think this is possible rn.

@wiiznokes
Copy link
Contributor Author

this fix alignment but now, it's Element which have the wrong type:

error[E0277]: the trait bound `iced::advanced::iced_graphics::iced_core::Element<'_, AppMsg, iced_renderer::Renderer<Theme>>: std::convert::From<Modal<'_, AppMsg, _>>` is not satisfied
   --> src\app.rs:184:14
    |
184 |             .into()
    |              ^^^^ the trait `std::convert::From<Modal<'_, AppMsg, _>>` is not implemented for `iced::advanced::iced_graphics::iced_core::Element<'_, AppMsg, iced_renderer::Renderer<Theme>>`
    |
    = help: the following other types implement trait `std::convert::From<T>`:
              <iced::advanced::iced_graphics::iced_core::Element<'a, Message, Renderer> as std::convert::From<Column<'a, Message, Renderer>>>
              <iced::advanced::iced_graphics::iced_core::Element<'a, Message, Renderer> as std::convert::From<MouseArea<'a, Message, Renderer>>>
              <iced::advanced::iced_graphics::iced_core::Element<'a, Message, Renderer> as std::convert::From<Row<'a, Message, Renderer>>>
              <iced::advanced::iced_graphics::iced_core::Element<'a, Message, Renderer> as std::convert::From<iced::widget::Button<'a, Message, Renderer>>>
              <iced::advanced::iced_graphics::iced_core::Element<'a, Message, Renderer> as std::convert::From<iced::widget::Checkbox<'a, Message, Renderer>>>
              <iced::advanced::iced_graphics::iced_core::Element<'a, Message, Renderer> as std::convert::From<widgets::context_menu::widget::ContextMenu<'a, Content, Message, Renderer>>>
              <iced::advanced::iced_graphics::iced_core::Element<'a, Message, Renderer> as std::convert::From<ComboBox<'a, T, Message, Renderer>>>
              <iced::advanced::iced_graphics::iced_core::Element<'a, Message, Renderer> as std::convert::From<iced::widget::Container<'a, Message, Renderer>>>
            and 18 others
    = note: required for `Modal<'_, AppMsg, _>` to implement `Into<iced::advanced::iced_graphics::iced_core::Element<'_, AppMsg, iced_renderer::Renderer<Theme>>>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `note` (bin "note") due to previous error

@genusistimelord
Copy link
Collaborator

ill take a look in a few. Currently updating other things atm.

@genusistimelord
Copy link
Collaborator

seems to build perfectly fine. I see no major issue's here. Try running cargo clean and cargo update before testing it again.

@wiiznokes
Copy link
Contributor Author

errors was on a personnal project. I finally found why I was getting these errors. I was using my fork of iced.
It makes me think that this is the main problem of iced_aw. We're stuck on the latest version of Iced. It would be nice to have the same system as System76 which uses a fork of Iced for their DE. Just a thought.

And seems good to me too, you can merge it :)

@genusistimelord
Copy link
Collaborator

they should fork it to set it to the version though really they should update to the newest iced and keep doing so. due to changed in Font rendering and other changes that should help them more.

Copy link
Collaborator

@genusistimelord genusistimelord left a comment

Choose a reason for hiding this comment

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

looks good thank you.

@genusistimelord genusistimelord merged commit 51247f3 into iced-rs:main Jul 31, 2023
2 checks passed
@wiiznokes wiiznokes deleted the modal-dev branch July 31, 2023 21:54
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

Successfully merging this pull request may close these issues.

2 participants