From 95fb86ec0882ada2564e13468fbacb0f3a6e1065 Mon Sep 17 00:00:00 2001 From: Floyd Wang Date: Mon, 14 Apr 2025 14:47:15 +0800 Subject: [PATCH] checkbox: Make checked icon sizable (#785) | Before | After | | - | - | | SCR-20250414-nbwx | SCR-20250414-nbli | --- crates/ui/src/checkbox.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/ui/src/checkbox.rs b/crates/ui/src/checkbox.rs index bb115a04..936dbb50 100644 --- a/crates/ui/src/checkbox.rs +++ b/crates/ui/src/checkbox.rs @@ -135,7 +135,13 @@ impl RenderOnce for Checkbox { .absolute() .top_px() .left_px() - .size_3() + .map(|this| match self.size { + Size::XSmall => this.size_2(), + Size::Small => this.size_2p5(), + Size::Medium => this.size_3(), + Size::Large => this.size_3p5(), + _ => this.size_3(), + }) .text_color(icon_color) .map(|this| match self.checked { true => this.path(IconName::Check.path()),