iced_aw icon indicating copy to clipboard operation
iced_aw copied to clipboard

TabBar and Tabs doesn't work with iced cloned from github

Open C-Entropy opened this issue 10 months ago • 15 comments

I am using iced master with iced_aw bd6b1495706b7e4247d612aa8e8be7e11cf14f3f, and TabBar and Tabs doesn't work.

I'm using the latest commit because it add support for CJK input method.

the trait bound Theme: iced_aw::tab_bar::Catalog is not satisfied the trait iced_aw::tab_bar::Catalog is implemented for

Cargo.toml

[dependencies]
iced = { git = "https://github.com/iced-rs/iced.git", features = ["tokio", "advanced"] }
iced_aw = { git = "https://github.com/iced-rs/iced_aw.git",  default-features = false, features = ["tab_bar", "tabs"] }

then just put anything from examples into src folder

C-Entropy avatar Feb 06 '25 15:02 C-Entropy

Hi,

To solve the first error, you need to add the feature image for Iced so that you can run the example.

Then the current master branch of iced_aw is using the release version (1.13.1) of iced, not their master branch.

I hope that by updating both issues will solve your issue altogether.

Ultraxime avatar Feb 06 '25 15:02 Ultraxime

Thanks, is there something like beta branch against the iced main?

It seems that it will take a long time for a new version of iced to be released, while there are some great updates.

C-Entropy avatar Feb 07 '25 00:02 C-Entropy

I haven't started porting the beta branch of iced. And I don't think @genusistimelord have either.

I don't know when I'll have time to do it. But feel free to implement it yourself

Ultraxime avatar Feb 07 '25 05:02 Ultraxime

I'm willing to give it a try, but I'm very new here, do you have any suggestions?

C-Entropy avatar Feb 07 '25 07:02 C-Entropy

I would fork the repo, create a dev branch and change the cargo.toml to fetch the iced main branch and see what cargo complains about And then try every example to check that nothing broke

Ultraxime avatar Feb 07 '25 08:02 Ultraxime

When some api was broken, how to figure out what to do to fix it? For example,to fix the missing on_event(), i searched the commit history of iced to locate which one removed it, and how files are updated. Is this the right way? Or are there other more effect ways?

C-Entropy avatar Feb 07 '25 09:02 C-Entropy

I'm no part of the iced development team. I'm just a user and contributor to iced_aw so it would be my idea Or maybe read the documentation from the development branch of iced There should also be a change log maybe it could help

Ultraxime avatar Feb 07 '25 09:02 Ultraxime

yeah we do not always stay synced with Iced as during iced changes they rapidly change to often for us to keep up. So we generally wait till it is almost to the next version to start working on that. We do however Accept contributions to Push the Beta Branch towards the current Iced master.

genusistimelord avatar Feb 07 '25 12:02 genusistimelord

i have make some progress on the on_event to update thing,but the iced_font is trouble me, complain something about iced_core::font and iced::font, can you take a look?

C-Entropy avatar Feb 07 '25 16:02 C-Entropy

yeah that crate also needs to be updated to the master as it uses the Iced_core Font stuff for its fonts

you can open a issue for that here https://github.com/Redhawk18/iced_fonts

genusistimelord avatar Feb 07 '25 16:02 genusistimelord

I have cloned the project and update iced_core version locally and it works fine. I think I will just left one comment in Cargo.toml of iced_aw for easier.

C-Entropy avatar Feb 08 '25 03:02 C-Entropy

I have try to adopt iced_aw with https://github.com/iced-rs/iced/commit/940a079d83f904bef0eb9514fce50cd0109219c9. You can view it at https://github.com/C-Entropy/iced_aw/tree/beta I can cargo run all examples, but some example like badge failed to auto change color when mouse hover. I guess it have something to do with https://github.com/iced-rs/iced/pull/2662:

This PR changes the runtime to only perform a redraw of the user interface when either an update occurs, or a widget explicitly requests it.

Can't figure out how to fix it by now, but at least it can save some works I suppose. Do you want a PR?

C-Entropy avatar Feb 08 '25 13:02 C-Entropy

There used to be a method for the shell to invalidate the widget layout and one to ask for the widget to be redrawn, maybe it will solve the issue

Ultraxime avatar Feb 08 '25 13:02 Ultraxime

I think we have to implement reactive-rendering for those widgets, but it may dive deep into the code logic, which I'm unfamiliar with. I will keep to update the beta branch if I have time.

C-Entropy avatar Feb 08 '25 14:02 C-Entropy

#350 should close this issue, probably.

mytdragon avatar Aug 07 '25 17:08 mytdragon