Skip to content

Commit

Permalink
Fix Switch element in Cupertino & Fluent style not showing text when …
Browse files Browse the repository at this point in the history
…font size is large

Take the minimum height of the layout into account, like in the material style implementation.

Fixes #4201
  • Loading branch information
tronical committed Jan 2, 2024
1 parent c5be0ec commit 617d092
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/compiler/widgets/cupertino-base/switch.slint
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export component Switch {
}

min-width: 26px;
min-height: 15px;
min-height: max(15px, i-layout.min-height);
vertical-stretch: 0;
horizontal-stretch: 0;
accessible-label: root.text;
Expand Down
2 changes: 1 addition & 1 deletion internal/compiler/widgets/fluent-base/switch.slint
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export component Switch {
}

min-width: 40px;
min-height: 20px;
min-height: max(20px, i-layout.min-height);
vertical-stretch: 0;
horizontal-stretch: 0;
accessible-label: root.text;
Expand Down

0 comments on commit 617d092

Please sign in to comment.