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

TabBar/Tabs using a type instead of usize for active_tab #128

Merged
merged 9 commits into from
Jun 5, 2023

Conversation

andretietz
Copy link
Contributor

Hey there!

I created the feature request #124 and since I didn't want to wait for it, I just implemented it.
It's not done yet but, I wanted to hear your impression, so that I won't run into a complete wrong direction.

TODO:

  • ATM There's no check if there are 2 indices duplicated on the TabBar/Tabs. I need to check this as non-verbose as possible. I want to avoid Result-Type for the new-function, but I am not sure if this is possible with this implementation. Any ideas?

src/native/tab_bar.rs Outdated Show resolved Hide resolved
src/native/tab_bar.rs Outdated Show resolved Hide resolved
src/native/tab_bar.rs Outdated Show resolved Hide resolved
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.

I request you get this update with the current main. Also everything else looks good. would be nice to see an tab ID enum used in the example though.

src/graphics/tabs.rs Outdated Show resolved Hide resolved
@andretietz
Copy link
Contributor Author

The example you're searching is here or do you mean another place?

In the TabBar example I am using usize as custom type.

@andretietz andretietz mentioned this pull request Jun 2, 2023
@andretietz andretietz marked this pull request as ready for review June 5, 2023 08:39
@andretietz
Copy link
Contributor Author

Ok, I believe I am done with the Feature request #124. Please review and feel free to squash-merge, when done.

@genusistimelord genusistimelord merged commit 5efe80a into iced-rs:main Jun 5, 2023
1 of 2 checks passed
@genusistimelord
Copy link
Collaborator

thank you for your hard work.

@andretietz andretietz deleted the feature/custom_tab_id branch June 6, 2023 11:36
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.

None yet

2 participants