Split basic components for reuse.
This commit is contained in:
25
qml/Components/ClideHandle.qml
Normal file
25
qml/Components/ClideHandle.qml
Normal file
@@ -0,0 +1,25 @@
|
||||
// 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 {
|
||||
required property bool hovered
|
||||
required property bool pressed
|
||||
|
||||
border.color: pressed ? RustColors.pressed : hovered ? RustColors.hovered : RustColors.gutter
|
||||
color: pressed ? RustColors.pressed : hovered ? RustColors.hovered : RustColors.gutter
|
||||
implicitHeight: 8
|
||||
radius: 2.5
|
||||
|
||||
// Execute these behaviors when the color is changed.
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 400
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user