summaryrefslogtreecommitdiffstats
path: root/native/src/widget/checkbox.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/checkbox.rs')
-rw-r--r--native/src/widget/checkbox.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs
index 9e7f183a..a49d2fa2 100644
--- a/native/src/widget/checkbox.rs
+++ b/native/src/widget/checkbox.rs
@@ -158,7 +158,10 @@ where
Text::new(&self.label)
.font(self.font.clone())
.width(self.width)
- .size(self.text_size.unwrap_or(renderer.default_size())),
+ .size(
+ self.text_size
+ .unwrap_or_else(|| renderer.default_size()),
+ ),
)
.layout(renderer, limits)
}