Fix right padding in toggler when no label is present

Fixes #2942
This commit is contained in:
Héctor Ramón Jiménez 2025-05-17 19:04:29 +02:00
parent 5de7bc83bd
commit 7c5a4bc465
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -279,7 +279,11 @@ where
layout::next_to_each_other(
&limits,
self.spacing,
if self.label.is_some() {
self.spacing
} else {
0.0
},
|_| layout::Node::new(Size::new(2.0 * self.size, self.size)),
|limits| {
if let Some(label) = self.label.as_deref() {