Mercurial > demo / src/crates/ui/pages/controls.slint
1 import { Button, GroupBox, SpinBox, ComboBox, CheckBox, LineEdit, TabWidget, VerticalBox, HorizontalBox, 2 Slider, SpinBox } from "std-widgets.slint"; 3 import { UiConfig } from "../config.slint"; 4 import { Page } from "page.slint"; 6 export component ControlsPage inherits Page { 8 description: "This page gives an overview of the default widget set provided by Slint. The widgets are available in different styles native, fluent-(dark/light) and material-(dark/light). The widgets can be imported from \"std-widgets.slint\"."; 19 text: "Regular Button"; 20 enabled: !UiConfig.widgets-disabled; 24 text: "Button with Icon"; 25 icon: @image-url("../img/treez.png"); 26 enabled: !UiConfig.widgets-disabled; 31 text: self.checked ? "ON" : "OFF"; 32 enabled: !UiConfig.widgets-disabled; 38 title: "CheckBox - SpinBox - ComboBox"; 43 checkbox := CheckBox { 44 text: checkbox.checked ? "(checked)" : "(unchecked)"; 46 enabled: !UiConfig.widgets-disabled; 53 enabled: !UiConfig.widgets-disabled; 57 model: ["Select Something", "From this", "Combobox"]; 58 enabled: !UiConfig.widgets-disabled; 70 placeholder-text: "Enter some text"; 71 enabled: !UiConfig.widgets-disabled; 84 enabled: !UiConfig.widgets-disabled; 99 title: "Content of tab 1"; 106 enabled: !UiConfig.widgets-disabled; 120 title: "Content of tab 2"; 127 enabled: !UiConfig.widgets-disabled; 139 text: "Content of tab 3";