slint/demos/printerdemo_mcu/ui/copy_page.slint
Simon Hausmann a98d4709be Move printer demo and energy-monitor into new top-level demos/ folder
These are showing off use-cases for Slint, but they're not examples showing individual Slint features.

Also removed the old printerdemo while at it.
2024-10-25 12:09:32 +02:00

77 lines
2.1 KiB
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: MIT
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 {} }
}
}