mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00

* Update api/node/src/types/brush.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update tests/cases/callbacks/handler_with_arg.slint Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
23 lines
666 B
JavaScript
Executable file
23 lines
666 B
JavaScript
Executable file
#!/usr/bin/env node
|
|
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import * as slint from "slint-ui";
|
|
let demo = slint.loadFile("../ui/printerdemo.slint");
|
|
let window = new demo.MainWindow();
|
|
|
|
window.ink_levels = [
|
|
{ color: "#00ffff", level: 0.30 },
|
|
{ color: "#ff00ff", level: 0.80 },
|
|
{ color: "#ffff00", level: 0.60 },
|
|
{ color: "#000000", level: 0.90 }];
|
|
|
|
window.fax_number_erase = function () {
|
|
window.fax_number = window.fax_number.substring(0, window.fax_number.length - 1);
|
|
};
|
|
window.fax_send = function () {
|
|
console.log("Send fax to " + window.fax_number);
|
|
window.fax_number = "";
|
|
};
|
|
|
|
window.run();
|