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

Expose state override for HeaderResponse #4200

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

Zeenobit
Copy link
Contributor

I'm trying to create some custom collapsing headers that add additional buttons inside the header itself. Because of this, I load the CollapsingState in my special widget manually. But because HeaderResponse owns the Ui and the CollapsingState, there is no way for me to open/close the collapsing header based on response of the inner widget.

Initially, I considered just exposing state member of HeaderResponse, but that exposes too much of the API at the wrong time, in my opinion.

So instead I found it'd be safer to just expose the open/close API to the response itself, and that's what this PR does.

@enomado
Copy link
Contributor

enomado commented Mar 21, 2024

May be, If you upvote this, we could save few man-years #4181

@emilk emilk added the egui label Mar 21, 2024
@emilk emilk merged commit e4f209e into emilk:master Mar 21, 2024
19 of 20 checks passed
@Zeenobit Zeenobit deleted the header_resp_control branch March 21, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants