Open emilk opened 3 years ago
i'll take it
i've got this https://github.com/nside/egui/commit/9285214cc0495e741b0029cbdf8a36f40accb722 but it's overriding the state in the collapsing header. somehow the ctx is needed to retrieve the header state. how would you handle this?
why not keep the collapsing header state in the window struct?
struct Window
is a builder - it stores no state at all between frames. The position and size of a window is stored in area::State
, the scroll offset in scroll_area::State
, the collapsing state in collapsing_header::State
.
I meant adding an Option<collapsing_header::State>
field to the struct Window
- similar to how area and scroll are handled. Otherwise the collapsed bool would need to be handled similarly to the window open
state?
Any updates on this? Is there any way to have a window collapsed by default at this point?
I also would like this feature. I'm creating an editor app with lots of functionalities that shouldn't be visible right at startup.
I'd also like this feature. Is someone working on this? I see #3517 marked as draft with no progress for four months. Are you still working on it, @Norlock? Or would you be open to me taking over the PR or making a whole new attempt at this feature?
You can also continue, I have been busy with other projects so haven't really looked into it. But let me try if I can make an improvement (today/tomorrow). I will have to look at the code again.
We should add two methods to
egui::Window
default_collapsed
: set whether the initial state of the window is collapsedcollapsed
: set whether the current state of the window is collapsed