mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 07:37:24 +00:00

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.
77 lines
2.1 KiB
Text
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 {} }
|
|
}
|
|
}
|