// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: MIT import { DemoPalette, Page, SpinBox, ComboBox, CheckBox, Label } from "common.slint"; export global PrinterSettings { callback change-language(int); } export component SettingsPage inherits Page { header: @tr("Settings"); GridLayout { padding-top: 46px /* header line height in design */ + /* extra top-padding in design */ 27px; spacing: 24px; Row { Text { colspan: 4; text: @tr("General"); color: DemoPalette.secondary-foreground-color; font-size: DemoPalette.base-font-size * 1.125; font-weight: 800; } } Row { Label { text: @tr("TURBO mode"); } CheckBox { checked: true; } Rectangle {} Label { text: @tr("Power Management"); } CheckBox { checked: false; text: @tr("Eco Mode"); } } Row { Text { colspan: 4; text: @tr("Defaults"); color: DemoPalette.secondary-foreground-color; font-size: DemoPalette.base-font-size * 1.125; font-weight: 800; } } Row { Label { text: @tr("Layout"); } ComboBox { value: @tr("Portrait"); choices: [@tr("Portrait"), @tr("Landscape")]; } Rectangle {} Label { text: @tr("Paper Tray"); } ComboBox { value: @tr("Special Tray"); choices: [@tr("Special Tray"), @tr("Normal Tray")]; } } Row { Label { text: @tr("Quality"); } ComboBox { value: @tr("Best"); choices: [@tr("Best"), @tr("Medium"), @tr("Draft")]; } Rectangle {} Label { text: @tr("Language"); } ComboBox { value: @tr("English"); choices: [@tr("English"), @tr("French")]; selected(x) => { PrinterSettings.change-language(x); } } } Row { Label { text: @tr("Color Mode"); } ComboBox { value: @tr("Grayscale"); choices: [@tr("Grayscale"), @tr("RGB"), @tr("YCMB")]; } Rectangle {} Label { text: @tr("Paper Handling"); } CheckBox { checked: true; text: @tr("Sort Pages"); } } Row { Rectangle {} } } }