File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
crates/egui/src/containers Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -576,17 +576,14 @@ impl Window<'_> {
576576 let ( content_inner, content_response) = collapsing
577577 . show_body_unindented ( & mut frame. content_ui , |ui| {
578578 resize. show ( ui, |ui| {
579- let add_contents_with_margin = |ui : & mut Ui | {
579+ let margin = ui. spacing ( ) . window_margin ;
580+ if scroll. is_any_scroll_enabled ( ) {
581+ scroll. content_margin ( margin) . show ( ui, add_contents) . inner
582+ } else {
580583 crate :: Frame :: NONE
581- . inner_margin ( ui . spacing ( ) . window_margin )
584+ . inner_margin ( margin )
582585 . show ( ui, add_contents)
583586 . inner
584- } ;
585-
586- if scroll. is_any_scroll_enabled ( ) {
587- scroll. show ( ui, add_contents_with_margin) . inner
588- } else {
589- add_contents_with_margin ( ui)
590587 }
591588 } )
592589 } )
You can’t perform that action at this time.
0 commit comments