slint/examples/printerdemo/ui/print_page.60
Olivier Goffart 689d4a3c16 Printer demo: fix issue after the viewport gets its own element
The layout inside the flickable will no longer be included to
size the paretn layout. We must not take the inner part of the layout
into account
2021-04-09 19:14:48 +02:00

44 lines
No EOL
1.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, PushButton, PrinterQueueItem } from "./common.60";
import { WidePrinterQueueList } from "./printer_queue.60";
export PrintPage := Page {
has_back_button: true;
header: "Print";
callback cancel_job(int);
callback pause_job(int);
property <[PrinterQueueItem]> printer_queue <=> queue.printer_queue;
GridLayout {
padding-top: 46px /* header line height in design */
+ /* extra top-padding in design */ 27px;
spacing: 24px;
Row {
Text {
text: "Printing-Queue";
color: DemoPalette.secondary_foreground_color;
font-size: DemoPalette.base_font_size * 1.125;
font-weight: 800;
}
}
Row {
queue := WidePrinterQueueList {
cancel_job(id) => { root.cancel_job(id); }
pause_job(id) => { root.pause_job(id); }
viewport_width: width;
}
}
}
}