slint/examples/printerdemo/ui/scan_page.60
Tobias Hunger 639b42697e Printerdemo: Do not allow 0 copies
Just a bit of polish. The functionality is already implemented, so use
it;-)
2021-03-05 20:09:13 +01:00

88 lines
No EOL
2.4 KiB
Text

/* LICENSE BEGIN
This file is part of the SixtyFPS Project -- https://sixtyfps.io
Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
Copyright (c) 2020 Simon Hausmann <simon.hausmann@sixtyfps.io>
SPDX-License-Identifier: GPL-3.0-only
This file is also available under commercial licensing terms.
Please contact info@sixtyfps.io for more information.
LICENSE END */
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton } from "./common.60";
export ScanPage := Page {
callback start_job(string);
has_back_button: true;
header: "Scan";
GridLayout {
padding-top: 46px /* header line height in design */
+ /* extra top-padding in design */ 27px;
spacing: 24px;
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;
}
Rectangle {}
Label { text: "Size"; }
ComboBox { value: "Original"; }
}
Row {
Label { text: "Quality"; }
ComboBox { value: "Best"; }
Rectangle {}
Label { text: "Format"; }
ComboBox { value: "PDF"; }
}
Row {
Label { text: "Color"; }
ComboBox { value: "Grayscale"; }
Rectangle {}
Label { text: "Save to"; }
ComboBox { value: "Desktop"; }
}
Row {
Rectangle {
colspan: 3;
}
HorizontalLayout {
col: 3;
colspan: 2;
Rectangle {
horizontal-stretch: 0;
width: 10%;
}
PushButton {
icon: @image-url("images/scan.svg");
text: "Start scanning";
clicked => {
root.start_job("Scan");
}
}
Rectangle {
horizontal-stretch: 0;
width: 10%;
}
}
}
Row { Rectangle {} }
}
}