mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-26 18:06:26 +00:00
Switch: ensure that the min-width contains the text
Currently, the min-with don't account for the text. That means that, for example, the switch on the top bar of the gallery, get the text to overflow which doesn't look good by default
This commit is contained in:
parent
1739260de1
commit
2f57a4df35
3 changed files with 3 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ export component Switch {
|
|||
root.toggled();
|
||||
}
|
||||
|
||||
min-width: 48px;
|
||||
min-width: max(48px, layout.min-width);
|
||||
min-height: max(24px, layout.min-height);
|
||||
vertical-stretch: 0;
|
||||
horizontal-stretch: 0;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export component Switch {
|
|||
root.toggled();
|
||||
}
|
||||
|
||||
min-width: 26px;
|
||||
min-width: max(26px, i-layout.min-width);
|
||||
min-height: max(15px, i-layout.min-height);
|
||||
vertical-stretch: 0;
|
||||
horizontal-stretch: 0;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export component Switch {
|
|||
root.toggled();
|
||||
}
|
||||
|
||||
min-width: 40px;
|
||||
min-width: max(40px, layout.min-width);
|
||||
min-height: max(20px, layout.min-height);
|
||||
vertical-stretch: 0;
|
||||
horizontal-stretch: 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue