Files
z-bar-qt/Modules/Settings/Common/ConnectedRect.qml
T
Inorishio d1a045787e
C++ / fmt (pull_request) Successful in 6s
C++ / build (pull_request) Successful in 2m9s
JS/TS / fmt (pull_request) Successful in 16s
JS/TS / lint (pull_request) Successful in 16s
Python / static (pull_request) Successful in 49s
C++ / clang-tidy (pull_request) Successful in 3m34s
Rust / build (pull_request) Successful in 1m1s
Rust / fmt (pull_request) Successful in 31s
Python / verify (pull_request) Successful in 1m45s
Rust / clippy (pull_request) Successful in 45s
merge from main, settings window wifi updates, component creation, remove known network window
2026-09-20 18:44:20 +02:00

74 lines
1.5 KiB
QML

import QtQuick
import qs.Components
import ZShell.Config
import qs.Services
CustomRect {
id: root
property bool first
property bool last
property string settingAnchor
function flashHighlight(): void {
flash.restart();
}
bottomLeftRadius: last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
bottomRightRadius: last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
color: Colors.tPalette.m3surfaceContainer
opacity: enabled && (!parent || parent.enabled) ? 1 : 0.5
topLeftRadius: first ? Tokens.rounding.large : Tokens.rounding.extraSmall
topRightRadius: first ? Tokens.rounding.large : Tokens.rounding.extraSmall
Behavior on opacity {
Anim {
}
}
CustomRect {
id: highlight
anchors.fill: parent
bottomLeftRadius: parent.bottomLeftRadius
bottomRightRadius: parent.bottomRightRadius
color: Colors.palette.m3primary
opacity: 0
radius: parent.radius
topLeftRadius: parent.topLeftRadius
topRightRadius: parent.topRightRadius
SequentialAnimation {
id: flash
Anim {
duration: Tokens.anim.durations.small
property: "opacity"
target: highlight
to: 0.2
}
Anim {
duration: Tokens.anim.durations.normal
property: "opacity"
target: highlight
to: 0.08
}
Anim {
duration: Tokens.anim.durations.small
property: "opacity"
target: highlight
to: 0.2
}
Anim {
duration: Tokens.anim.durations.extraLarge
property: "opacity"
target: highlight
to: 0
}
}
}
}