mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-30 23:27:22 +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.
26 lines
No EOL
599 B
Text
26 lines
No EOL
599 B
Text
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import { Theme } from "../theme.slint";
|
|
|
|
export component StateLayer inherits TouchArea {
|
|
in property <length> border-radius <=> i-container.border-radius;
|
|
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
states [
|
|
pressed when root.pressed : {
|
|
i-container.opacity: 0.12;
|
|
}
|
|
]
|
|
|
|
i-container := Rectangle {
|
|
width: 100%;
|
|
height: 100%;
|
|
background: Theme.palette.pure-black;
|
|
opacity: 0.0;
|
|
|
|
animate background { duration: Theme.durations.medium; }
|
|
}
|
|
} |