slint/internal/compiler/widgets/cupertino-base/groupbox.slint
Florian Blasius 80407d0375
Added cupertino style for std-widgets (#3301)
* Started with cupertino style
2023-08-21 11:04:18 +02:00

36 lines
No EOL
1,016 B
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
import { Typography, Palette } from "styling.slint";
export component GroupBox {
in property <string> title <=> label.text;
in property<bool> enabled: true;
VerticalLayout {
spacing: 6px;
padding-top: 12px;
padding-bottom: 12px;
label := Text {
vertical-stretch: 0;
color: !root.enabled ? Palette.foreground-disabled : Palette.foreground;
font-size: Typography.body-strong.font-size;
font-weight: Typography.body-strong.font-weight;
}
Rectangle {
vertical-stretch: 1;
border-radius: 6px;
background: Palette.background-alt;
border-width: 1px;
border-color: Palette.border;
GridLayout {
padding: 8px;
@children
}
}
}
}