Add RustColors singleton helper.

This commit is contained in:
2025-03-30 11:20:21 -04:00
parent be9981291c
commit d2f5823594
11 changed files with 145 additions and 197 deletions

View File

@@ -4,6 +4,8 @@ import QtQuick.Layouts
import "../Editor"
import clide.module 1.0
SplitView {
Layout.fillHeight: true
Layout.fillWidth: true
@@ -11,14 +13,15 @@ SplitView {
// Customized handle to drag between the Navigation and the Editor.
handle: Rectangle {
border.color: SplitHandle.hovered ? "#303234" : "#3c3f41"
color: SplitHandle.pressed ? "#4b4f51" : "#3c3f41"
border.color: SplitHandle.pressed ? RustColors.pressed : SplitHandle.hovered ? RustColors.hovered : RustColors.gutter
color: SplitHandle.pressed ? RustColors.pressed : SplitHandle.hovered ? RustColors.hovered : RustColors.gutter
implicitWidth: 8
opacity: SplitHandle.hovered || navigationView.width < 15 ? 1.0 : 0.0
radius: 2.5
Behavior on opacity {
OpacityAnimator {
duration: 700
// Execute these behaviors when the color is changed.
Behavior on color {
ColorAnimation {
duration: 400
}
}
}
@@ -28,7 +31,7 @@ SplitView {
SplitView.fillHeight: true
SplitView.preferredWidth: 200
color: "#303234"
color: RustColors.explorer_background
StackLayout {
anchors.fill: parent