1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
4// widget imports
5export { Button } from "button.slint";
6export { CheckBox } from "checkbox.slint";
7export { ScrollView } from "scrollview.slint";
8import { MaterialPalette } from "styling.slint";
9export { Switch } from "switch.slint";
10export { ListItem } from "components.slint";
11export { LineEdit } from "lineedit.slint";
12export { MenuBarItem, MenuBar, MenuFrame, MenuItem } from "menu.slint";
13
14export global StyleMetrics {
15 out property <length> layout-spacing: 16px;
16 out property <length> layout-padding: 16px;
17 out property <length> text-cursor-width: 2px;
18
19 out property <color> default-text-color: MaterialPalette.foreground;
20 out property <color> textedit-background: transparent;
21 out property <color> textedit-text-color: MaterialPalette.foreground;
22 out property <color> textedit-background-disabled: transparent;
23 out property <color> textedit-text-color-disabled: MaterialPalette.foreground;
24 out property <bool> dark-color-scheme: Palette.color-scheme == ColorScheme.dark;
25 out property <string> default-font-family: "Roboto";
26 out property <color> window-background: MaterialPalette.background;
27 out property <string> style-name: "material";
28}
29
30export global Palette {
31 out property <brush> background: MaterialPalette.background;
32 out property <brush> foreground: MaterialPalette.foreground;
33 out property <brush> alternate-background: MaterialPalette.alternate-background;
34 out property <brush> alternate-foreground: MaterialPalette.alternate-foreground;
35 out property <brush> control-background: MaterialPalette.control-background;
36 out property <brush> control-foreground: MaterialPalette.control-foreground;
37 out property <brush> accent-background: MaterialPalette.accent-background;
38 out property <brush> accent-foreground: MaterialPalette.accent-foreground;
39 out property <brush> selection-background: MaterialPalette.selection-background;
40 out property <brush> selection-foreground: MaterialPalette.selection-foreground;
41 out property <brush> border: MaterialPalette.border;
42 in-out property <ColorScheme> color-scheme <=> MaterialPalette.color-scheme;
43}
44