1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: MIT
3
4import { Theme } from "../theme.slint";
5import { StateLayer } from "../components/state_layer.slint";
6
7export component MenuButton {
8 callback clicked <=> i-state-layer.clicked;
9
10 min-width: 100px;
11 min-height: 32px;
12 opacity: root.visible ? 1.0 : 0.0;
13
14 animate opacity { duration: Theme.durations.fast; }
15
16 i-container := Rectangle {
17 background: Theme.palette.heliotrope-gradient;
18 border-radius: root.height / 2;
19
20 Rectangle {
21 width: 55px;
22 height: 5px;
23 background: Theme.palette.white;
24 border-radius: 3px;
25 }
26 }
27
28 i-state-layer := StateLayer {
29 border-radius: i-container.border-radius;
30 }
31}