Skip to content

Commit 7c5a4bc

Browse files
committed
Fix right padding in toggler when no label is present
Fixes #2942
1 parent 5de7bc8 commit 7c5a4bc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

widget/src/toggler.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,11 @@ where
279279

280280
layout::next_to_each_other(
281281
&limits,
282-
self.spacing,
282+
if self.label.is_some() {
283+
self.spacing
284+
} else {
285+
0.0
286+
},
283287
|_| layout::Node::new(Size::new(2.0 * self.size, self.size)),
284288
|limits| {
285289
if let Some(label) = self.label.as_deref() {

0 commit comments

Comments
 (0)