mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-11 12:56:27 +00:00

We implicitly export the last component of a .slint file to the generator. Issue a warning when that happens and suggest to export it explicitly.
57 lines
1.6 KiB
Text
57 lines
1.6 KiB
Text
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
|
|
|
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView, GridBox } from "std-widgets.slint";
|
|
import { Label, Page, Preview } from "common.slint";
|
|
|
|
export component PrintPage inherits Page {
|
|
|
|
layout := GridLayout {
|
|
padding-left: 40px;
|
|
padding-right: 40px;
|
|
spacing: 20px;
|
|
padding-top: 20px;
|
|
padding-bottom: 20px;
|
|
|
|
Row {
|
|
preview := Preview { }
|
|
GridBox {
|
|
Row {
|
|
Label {
|
|
text: "Select File:";
|
|
}
|
|
}
|
|
|
|
Row {
|
|
StandardListView {
|
|
model: [
|
|
{ text: ".." },
|
|
{ text: "cat.jpg" },
|
|
{ text: "dog.jpg" },
|
|
{ text: "elephant.jpg" },
|
|
{ text: "snake.jpg" },
|
|
];
|
|
}
|
|
}
|
|
|
|
Row {
|
|
Label {
|
|
text: "Copies:";
|
|
}
|
|
}
|
|
|
|
Row {
|
|
SpinBox {
|
|
horizontal-stretch: 1;
|
|
}
|
|
}
|
|
Row {
|
|
Button {
|
|
text: "Print Page";
|
|
horizontal-stretch: 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|