Files
clide/qml/Components/ClideHandle.qml
2026-02-04 19:29:52 -05:00

35 lines
777 B
QML

// SPDX-FileCopyrightText: 2026, Shaun Reed <shaunrd0@gmail.com>
//
// SPDX-License-Identifier: GNU General Public License v3.0 or later
import QtQuick
import QtQuick.Controls
import clide.module 1.0
Rectangle {
readonly property color currentColor: {
if (pressed) {
return RustColors.pressed;
} else if (hovered) {
return RustColors.hovered;
} else {
return RustColors.gutter;
}
}
required property bool hovered
required property bool pressed
border.color: currentColor
color: currentColor
implicitHeight: 8
radius: 2.5
// Execute these behaviors when the color is changed.
Behavior on color {
ColorAnimation {
duration: 400
}
}
}