Files
deckui/remote/ui/widgets/clickable.slint
2023-08-06 10:39:54 +02:00

19 lines
362 B
Plaintext

import { Palette } from "../_imports/coop-widgets.slint";
export component Clickable inherits TouchArea {
in property <image> icon;
callback action;
Image {
width: 128px;
height: 128px;
colorize: root.pressed ? Palette.accent: Palette.foreground;
source: icon;
}
clicked => {
action();
}
}