mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-05 06:59:50 -05:00
bar/systray: add arrow for entries with children
This commit is contained in:
parent
ff99ac76cc
commit
3f8ed91cd3
4 changed files with 44 additions and 71 deletions
|
|
@ -3,11 +3,12 @@ import Quickshell.Widgets
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "../../widgets" as Widgets
|
||||
import "../.."
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
required property var menuData
|
||||
required property QsMenuEntry menuData
|
||||
signal interacted
|
||||
|
||||
WrapperRectangle {
|
||||
|
|
@ -92,24 +93,32 @@ ColumnLayout {
|
|||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
Connections {
|
||||
target: root.menuData
|
||||
|
||||
function onTextChanged() {
|
||||
console.log("Hi");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.preferredHeight: 20
|
||||
Layout.preferredWidth: 20
|
||||
Layout.rightMargin: 5
|
||||
|
||||
Widgets.IconButton {
|
||||
id: arrowButton
|
||||
visible: root.menuData?.hasChildren
|
||||
activeRectangle: false
|
||||
source: "root:resources/general/right-arrow.svg"
|
||||
rotation: subTrayMenu.visible ? 90 : 0
|
||||
anchors.fill: parent
|
||||
|
||||
Behavior on rotation {
|
||||
NumberAnimation {
|
||||
duration: 150
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
root.expanded = !root.expanded;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue