diff --git a/egui/src/containers/collapsing_header.rs b/egui/src/containers/collapsing_header.rs index 66c6b213a9d..0a1a31ddc53 100644 --- a/egui/src/containers/collapsing_header.rs +++ b/egui/src/containers/collapsing_header.rs @@ -331,9 +331,12 @@ impl CollapsingHeader { { let rect = rect.expand(visuals.expansion); - let corner_radius = 2.0; - ui.painter() - .rect(rect, corner_radius, visuals.bg_fill, visuals.bg_stroke); + ui.painter().rect( + rect, + visuals.corner_radius, + visuals.bg_fill, + visuals.bg_stroke, + ); } { diff --git a/egui/src/widgets/selected_label.rs b/egui/src/widgets/selected_label.rs index bf08b41c2f3..8ddb5c2e286 100644 --- a/egui/src/widgets/selected_label.rs +++ b/egui/src/widgets/selected_label.rs @@ -64,9 +64,12 @@ impl Widget for SelectableLabel { if selected || response.hovered() || response.has_focus() { let rect = rect.expand(visuals.expansion); - let corner_radius = 2.0; - ui.painter() - .rect(rect, corner_radius, visuals.bg_fill, visuals.bg_stroke); + ui.painter().rect( + rect, + visuals.corner_radius, + visuals.bg_fill, + visuals.bg_stroke, + ); } text.paint_with_visuals(ui.painter(), text_pos, &visuals);