[BasicUI] Show buttons on several lines when not enough place (#2341)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
pull/2346/head
lolodomo 2024-02-11 18:34:34 +01:00 committed by GitHub
parent 946b499f6d
commit 24a7bf05b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 4 deletions

View File

@ -58,8 +58,8 @@ public class SwitchRenderer extends AbstractWidgetRenderer {
private final Logger logger = LoggerFactory.getLogger(SwitchRenderer.class);
private static final int MAX_BUTTONS = 4;
private static final int MAX_LABEL_SIZE = 9;
private static final int MAX_BUTTONS = 20;
private static final int MAX_LABEL_SIZE = 15;
private static final String ELLIPSIS = "\u2026";
@Activate

View File

@ -1,4 +1,4 @@
<div class="mdl-form__row mdl-cell mdl-cell--%cells%-col mdl-cell--%cells_tablet%-col-tablet %visibility_class%">
<div class="mdl-form__row mdl-form__row--height-auto mdl-cell mdl-cell--%cells%-col mdl-cell--%cells_tablet%-col-tablet %visibility_class%">
<span %iconstyle% class="mdl-form__icon">
%icon_snippet%
</span>

View File

@ -423,7 +423,14 @@
width: 100%;
}
&__buttons {
padding-top: 2px;
margin: 6px 0;
html.ui-layout-condensed & {
margin: 0;
}
max-width: 60%;
display: flex;
flex-wrap: wrap;
gap: 4px;
}
&__buttongrid {
padding: 0;