slint/examples/printerdemo_mcu/ui/copy_page.slint
Florian Blasius 520df46998
Update examples to new syntax (#2067)
* run slint-updater on examples
* manual syntax updates
2023-01-16 12:11:25 +00:00

77 lines
2.1 KiB
Text

// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton, CheckBox } from "./common.slint";
import { PrinterQueue } from "./printer_queue.slint";
export component CopyPage inherits Page {
has-back-button: true;
header: "Copy";
GridLayout {
padding-top: 23px /* header line height in design */
+ /* extra top-padding in design */ 13px;
spacing: 5px;
Row {
Text {
text: "Choose Settings";
color: DemoPalette.secondary-foreground-color;
font-size: DemoPalette.base-font-size * 1.125;
font-weight: 800;
}
}
Row {
Label { text: "Copies"; }
SpinBox {
value: 1;
minimum: 1;
}
}
/*Row {
Label { text: "Quality"; }
ComboBox {
value: "Best";
choices: ["Best", "Medium", "Draft"];
}
}*/
Row {
Label { text: "Color"; }
ComboBox {
value: "Grayscale";
choices: ["Grayscale", "Color"];
}
}
Row {
Label { text: "Paper Handling"; }
CheckBox {
checked: true;
text: "sort page";
}
}
Row {
HorizontalLayout {
col: 0;
colspan: 3;
Rectangle {
horizontal-stretch: 0;
width: 10%;
}
PushButton {
icon: @image-url("images/copy.svg");
text: "Start copying";
clicked => {
PrinterQueue.start-job("Copy");
}
}
Rectangle {
horizontal-stretch: 0;
width: 10%;
}
}
}
Row { Rectangle {} }
}
}