1#![allow(deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/issues"#]
2// Copyright © SixtyFPS GmbH <info@slint.dev>
3// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
4
5export enum IconType {
6 add,
7 arrow-down-fill,
8 arrow-left-fill,
9 arrow-right-fill,
10 arrow-up-fill,
11 check-small,
12 chevron-left,
13 chevron-right,
14 close,
15 delete,
16 done,
17 edit,
18 expand-more,
19 info,
20 keyboard-arrow-down,
21 keyboard-arrow-up,
22 logout,
23 menu,
24 settings,
25 task,
26 timer,
27}
28
29export component Icon inherits Image {
30 in property<IconType> type;
31
32 function source_from_type() -> image {
33 if (type == IconType.add) {
34 return @image-url("../../../logo/slint-logo-full-dark.png");
35 }
36 else if (type == IconType.chevron_left) {
37 return @image-url("../../../logo/slint-logo-full-dark.svg");
38 }
39 else if (type == IconType.chevron_right) {
40 return @image-url("../../../logo/slint-logo-full-light-large.png");
41 }
42 else if (type == IconType.close) {
43 return @image-url("../../../logo/slint-logo-full-light.png");
44 }
45 else if (type == IconType.delete) {
46 return @image-url("../../../logo/slint-logo-full-light.svg");
47 }
48 else if (type == IconType.edit) {
49 return @image-url("../../../logo/slint-logo-full-whitebg.png");
50 }
51 else if (type == IconType.info) {
52 return @image-url("../../../logo/slint-logo-simple-dark-large.png");
53 }
54 else if (type == IconType.logout) {
55 return @image-url("../../../logo/slint-logo-simple-dark.png");
56 }
57 else if (type == IconType.menu) {
58 return @image-url("../../../logo/slint-logo-simple-dark.svg");
59 }
60 else if (type == IconType.expand-more) {
61 return @image-url("../../../logo/slint-logo-simple-light-large.png");
62 }
63 else if (type == IconType.done) {
64 return @image-url("../../../logo/slint-logo-simple-light.png");
65 }
66 else if (type == IconType.check-small) {
67 return @image-url("../../../logo/slint-logo-simple-light.svg");
68 }
69 else if (type == IconType.keyboard-arrow-down) {
70 return @image-url("../../../logo/slint-logo-simple-whitebg.png");
71 }
72 else if (type == IconType.keyboard-arrow-up) {
73 return @image-url("../../../logo/slint-logo-small-dark-large.png");
74 }
75 else if (type == IconType.arrow-up-fill) {
76 return @image-url("../../../logo/slint-logo-small-dark.png");
77 }
78 else if (type == IconType.arrow-down-fill) {
79 return @image-url("../../../logo/slint-logo-small-dark.svg");
80 }
81 else if (type == IconType.arrow-left-fill) {
82 return @image-url("../../../logo/slint-logo-small-light-large.png");
83 }
84 else if (type == IconType.arrow-right-fill) {
85 return @image-url("../../../logo/slint-logo-small-light.png");
86 }
87 else if (type == IconType.task) {
88 return @image-url("../../../logo/slint-logo-small-light.svg");
89 }
90 else if (type == IconType.timer) {
91 return @image-url("../../../logo/slint-logo-small-whitebg.png");
92 }
93 else {
94 return @image-url("../../../logo/slint-logo-square-dark-128x128.png");
95 }
96 }
97
98 source: source_from_type();
99}
100}
101