mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 23:57:26 +00:00

These are showing off use-cases for Slint, but they're not examples showing individual Slint features. Also removed the old printerdemo while at it.
31 lines
No EOL
785 B
Text
31 lines
No EOL
785 B
Text
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import { Theme } from "../theme.slint";
|
|
import { StateLayer } from "../components/state_layer.slint";
|
|
|
|
export component MenuButton {
|
|
callback clicked <=> i-state-layer.clicked;
|
|
|
|
min-width: 100px;
|
|
min-height: 32px;
|
|
opacity: root.visible ? 1.0 : 0.0;
|
|
|
|
animate opacity { duration: Theme.durations.fast; }
|
|
|
|
i-container := Rectangle {
|
|
background: Theme.palette.heliotrope-gradient;
|
|
border-radius: root.height / 2;
|
|
|
|
Rectangle {
|
|
width: 55px;
|
|
height: 5px;
|
|
background: Theme.palette.white;
|
|
border-radius: 3px;
|
|
}
|
|
}
|
|
|
|
i-state-layer := StateLayer {
|
|
border-radius: i-container.border-radius;
|
|
}
|
|
} |