diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-10-04 15:43:02 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-10-04 15:43:02 +0800 |
| commit | 1aed1c0b13fb5a7e3ec2f19b9ef1403623d18123 (patch) | |
| tree | e0e1eb5c05ad95cfa7ad83e8dad2406a46d72783 /bar/Bar.qml | |
| parent | 0bdef4d722e947922b963ef42fdcc16dc1d7b1df (diff) | |
init
Diffstat (limited to 'bar/Bar.qml')
| -rw-r--r-- | bar/Bar.qml | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/bar/Bar.qml b/bar/Bar.qml index 6a3ef3d..70a633c 100644 --- a/bar/Bar.qml +++ b/bar/Bar.qml @@ -114,7 +114,70 @@ Scope { // Tray { // id: tray // } - TimeDate {} + Item { + Layout.preferredWidth: timeDateCCWrapper.implicitWidth + Layout.preferredHeight: timeDateCCWrapper.implicitHeight + IRect { + id: timeDateCCWrapper + color: Colors.accent + radius: Style.rounding.large + + anchors.fill: parent + + implicitHeight: Bar.height - General.rectMargin + implicitWidth: timeDateCC.width + General.rectMargin * 2 + RowLayout { + id: timeDateCC + property bool showcc: false + // width: childrenRect.width + // height: childrenRect.height + anchors.centerIn: parent + + TimeDate {} + Item { + implicitWidth: timeDateCC.showcc ? ccLoader.width : 0 + implicitHeight: timeDateCC.showcc ? ccLoader.height : 0 + Loader { + id: ccLoader + active: timeDateCC.showcc + sourceComponent: Component { + Icon { + text: "" + SequentialAnimation { + running: true + NumberAnimation { + target: parent + property: "opacity" + from: 0 + to: 1 + duration: General.animationDuration / 2 + easing.type: Easing.InOutQuad + } + } + } + } + } + Behavior on implicitWidth { + NumberAnimation { + duration: General.animationDuration / 4 + easing.type: Easing.InOutQuad + } + } + } + } + } + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + hoverEnabled: true + onEntered: { + timeDateCC.showcc = true; + } + onExited: { + timeDateCC.showcc = false; + } + } + } Network {} // Temp { // id: temp |
