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:
Olivier Goffart 2025-08-22 14:50:40 +02:00
parent 1739260de1
commit 2f57a4df35
3 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;