How to modify the small icon on the left side of CollapsingState #5327
Answered
by
YgorSouza
KUKU-zero2
asked this question in
Q&A
-
As the title suggests, the small icon of CollapsingState matches the background color. How can I change it? Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
YgorSouza
Oct 30, 2024
Replies: 1 comment 1 reply
-
Use show_toggle_button instead of let header_res = ui.horizontal(|ui| {
if ui.label("Header").clicked() {
state.toggle(ui);
}
state.show_toggle_button(ui, circle_icon);
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
KUKU-zero2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use show_toggle_button instead of
show_header
. There is an example there in the docs, but if you also want it to toggle when you click on the name, like the default header, you also have to call thetoggle
method that isn't mentioned in the example: