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

Allow to customize TabContainer tabs in editor #58749

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Mar 4, 2022

@KoBeWi
Copy link
Member Author

KoBeWi commented Oct 31, 2022

Rebased. The issue with rearranging still exists, but it's better than nothing.

@KoBeWi KoBeWi marked this pull request as ready for review October 31, 2022 18:08
@YuriSizov YuriSizov modified the milestones: 4.0, 4.x Feb 7, 2023
@YuriSizov YuriSizov modified the milestones: 4.x, 4.3 Oct 3, 2023
@KoBeWi
Copy link
Member Author

KoBeWi commented Apr 11, 2024

Rebased and updated using PropertyListHelper. Seems to be working correctly now.

scene/gui/tab_container.cpp Outdated Show resolved Hide resolved
@kitbdev
Copy link
Contributor

kitbdev commented Apr 16, 2024

Deleting / removing a child and undoing it does not restore the tab data. I'm not sure if we can fix this with the current undo system.

Setting a child to/from top level does not remove/add the entry until the scene is reloaded. The notify_property_list_changed(); should probably be in sort children instead of add/remove/move notify.
There may be more issues with top-level unrelated to this pr too.

For some reason, the default value for the title seems to be the first child's name, not the child at a given index. In the screenshot, the second child's name is 'a2' but the title for tab1 is overridden to be set that from a default of 'a1'.

image

@KoBeWi
Copy link
Member Author

KoBeWi commented Apr 16, 2024

For some reason, the default value for the title seems to be the first child's name, not the child at a given index. In the screenshot, the second child's name is 'a2' but the title for tab1 is overridden to be set that from a default of 'a1'.

Yeah so this is the result of the hack I used. I can fix it, but I'd rather wait until #88306 is merged and do it properly.

@KoBeWi KoBeWi modified the milestones: 4.3, 4.4 Apr 18, 2024
@KoBeWi
Copy link
Member Author

KoBeWi commented Apr 18, 2024

I fixed the naming issue.

Setting a child to/from top level does not remove/add the entry until the scene is reloaded. The notify_property_list_changed(); should probably be in sort children instead of add/remove/move notify.

Changing top_level does not resort children, so this is a TabContainer bug.

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

Successfully merging this pull request may close these issues.

Allow specifying icons for tabs in TabContainer
3 participants