clear and exit buttons on drawing popout + pin button
This commit is contained in:
@@ -13,10 +13,33 @@ Item {
|
||||
required property var drawing
|
||||
property bool expanded: true
|
||||
property real offsetScale: shouldBeActive ? 0 : 1
|
||||
property bool pinned: false
|
||||
required property ShellScreen screen
|
||||
readonly property bool shouldBeActive: visibilities.isDrawing
|
||||
required property var visibilities
|
||||
|
||||
function collapse(): void {
|
||||
if (pinned)
|
||||
return;
|
||||
|
||||
expanded = false;
|
||||
}
|
||||
|
||||
function expand(): void {
|
||||
expanded = true;
|
||||
}
|
||||
|
||||
function toggleExpanded(): void {
|
||||
if (pinned)
|
||||
return;
|
||||
|
||||
expanded = !expanded;
|
||||
}
|
||||
|
||||
function togglePinned(): void {
|
||||
pinned = !pinned;
|
||||
}
|
||||
|
||||
anchors.leftMargin: (-implicitWidth - 5) * offsetScale
|
||||
implicitHeight: content.implicitHeight
|
||||
implicitWidth: root.expanded ? content.implicitWidth : icon.implicitWidth
|
||||
@@ -76,6 +99,7 @@ Item {
|
||||
sourceComponent: Content {
|
||||
drawing: root.drawing
|
||||
visibilities: root.visibilities
|
||||
wrapper: root
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user