checkbox: Make checked icon sizable (#785)
| Before | After | | - | - | | <img width="642" alt="SCR-20250414-nbwx" src="https://github.com/user-attachments/assets/fa3daaf8-5465-49f5-8cd5-d59c19b50494" /> | <img width="644" alt="SCR-20250414-nbli" src="https://github.com/user-attachments/assets/e45aa560-0183-460a-b76d-e3cb0203067f" /> |
This commit is contained in:
parent
73be54a0f7
commit
95fb86ec08
1 changed files with 7 additions and 1 deletions
|
|
@ -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()),
|
||||
|
|
|
|||
Loading…
Reference in a new issue