Blob bounciness #67
@@ -97,7 +97,7 @@ CustomMouseArea {
|
|||||||
visibilities.dock = true;
|
visibilities.dock = true;
|
||||||
|
|
||||||
if (panels.sidebar.width === 0) {
|
if (panels.sidebar.width === 0) {
|
||||||
const showOsd = inRightPanel(panels.osd, x, y);
|
const showOsd = inRightPanel(panels.osdWrapper, x, y);
|
||||||
|
|
||||||
if (showOsd) {
|
if (showOsd) {
|
||||||
osdShortcutActive = false;
|
osdShortcutActive = false;
|
||||||
@@ -105,7 +105,7 @@ CustomMouseArea {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const outOfSidebar = x < width - panels.sidebar.width;
|
const outOfSidebar = x < width - panels.sidebar.width;
|
||||||
const showOsd = outOfSidebar && inRightPanel(panels.osd, x, y);
|
const showOsd = outOfSidebar && inRightPanel(panels.osdWrapper, x, y);
|
||||||
|
|
||||||
if (!osdShortcutActive) {
|
if (!osdShortcutActive) {
|
||||||
visibilities.osd = showOsd;
|
visibilities.osd = showOsd;
|
||||||
|
|||||||
+23
-11
@@ -26,6 +26,7 @@ Item {
|
|||||||
readonly property alias launcher: launcher
|
readonly property alias launcher: launcher
|
||||||
readonly property alias notifications: notifications
|
readonly property alias notifications: notifications
|
||||||
readonly property alias osd: osd
|
readonly property alias osd: osd
|
||||||
|
readonly property alias osdWrapper: osdWrapper
|
||||||
readonly property alias popouts: popouts.content
|
readonly property alias popouts: popouts.content
|
||||||
readonly property alias popoutsWrapper: popouts
|
readonly property alias popoutsWrapper: popouts
|
||||||
readonly property alias resources: resources
|
readonly property alias resources: resources
|
||||||
@@ -48,6 +49,28 @@ Item {
|
|||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: osdWrapper
|
||||||
|
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: sidebar.width * (1 - sidebar.offsetScale)
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
clip: sidebar.visible
|
||||||
|
|
||||||
|
implicitHeight: osd.implicitHeight
|
||||||
|
implicitWidth: osd.implicitWidth * (1 - osd.offsetScale)
|
||||||
|
|
||||||
|
Osd.Wrapper {
|
||||||
|
id: osd
|
||||||
|
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
screen: root.screen
|
||||||
|
sidebarOrSessionVisible: sidebar.visible
|
||||||
|
visibilities: root.visibilities
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Drawing.Wrapper {
|
Drawing.Wrapper {
|
||||||
id: drawing
|
id: drawing
|
||||||
|
|
||||||
@@ -58,17 +81,6 @@ Item {
|
|||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
}
|
}
|
||||||
|
|
||||||
Osd.Wrapper {
|
|
||||||
id: osd
|
|
||||||
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: sidebar.width
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
clip: sidebar.width > 0
|
|
||||||
screen: root.screen
|
|
||||||
visibilities: root.visibilities
|
|
||||||
}
|
|
||||||
|
|
||||||
Modules.ClipWrapper {
|
Modules.ClipWrapper {
|
||||||
id: popouts
|
id: popouts
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -188,7 +188,7 @@ Variants {
|
|||||||
|
|
||||||
bottomLeftRadius: 0
|
bottomLeftRadius: 0
|
||||||
deformAmount: 0.1 * Config.appearance.deform.scale
|
deformAmount: 0.1 * Config.appearance.deform.scale
|
||||||
exclude: panels.sidebar.offsetscale > 0.08 ? [] : [utilsBg]
|
exclude: panels.sidebar.offsetScale > 0.08 ? [] : [utilsBg]
|
||||||
implicitHeight: panel.height * (1 / rawDeformMatrix.m22) + 2
|
implicitHeight: panel.height * (1 / rawDeformMatrix.m22) + 2
|
||||||
panel: panels.sidebar
|
panel: panels.sidebar
|
||||||
}
|
}
|
||||||
@@ -197,8 +197,10 @@ Variants {
|
|||||||
id: osdBg
|
id: osdBg
|
||||||
|
|
||||||
deformAmount: 0.1 * Config.appearance.deform.scale
|
deformAmount: 0.1 * Config.appearance.deform.scale
|
||||||
panel: panels.osd
|
implicitWidth: panels.osd.width
|
||||||
|
panel: panels.osdWrapper
|
||||||
radius: 20
|
radius: 20
|
||||||
|
x: panels.osdWrapper.x + panels.osd.x + Config.barConfig.border
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelBg {
|
PanelBg {
|
||||||
|
|||||||
@@ -17,76 +17,33 @@ Item {
|
|||||||
readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0
|
readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
|
||||||
implicitHeight: 0
|
readonly property bool shouldBeActive: root.visibilities.dashboard && Config.dashboard.enabled
|
||||||
implicitWidth: content.implicitWidth
|
property real offsetScale: shouldBeActive ? 0 : 1
|
||||||
visible: height > 0
|
|
||||||
|
|
||||||
states: State {
|
visible: offsetScale < 1
|
||||||
name: "visible"
|
anchors.topMargin: (-implicitHeight - 5) * offsetScale
|
||||||
when: root.visibilities.dashboard && Config.dashboard.enabled
|
implicitHeight: content.implicitHeight
|
||||||
|
implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open
|
||||||
PropertyChanges {
|
opacity: 1 - offsetScale
|
||||||
root.implicitHeight: content.implicitHeight
|
|
||||||
}
|
|
||||||
}
|
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
from: ""
|
|
||||||
to: "visible"
|
|
||||||
|
|
||||||
|
Behavior on offsetScale {
|
||||||
Anim {
|
Anim {
|
||||||
duration: MaterialEasing.expressiveEffectsTime
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Transition {
|
|
||||||
from: "visible"
|
|
||||||
to: ""
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
|
|
||||||
onStateChanged: {
|
|
||||||
if (state === "visible" && timer.running) {
|
|
||||||
timer.triggered();
|
|
||||||
timer.stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: timer
|
|
||||||
|
|
||||||
interval: Appearance.anim.durations.extraLarge
|
|
||||||
running: true
|
|
||||||
|
|
||||||
onTriggered: {
|
|
||||||
content.active = Qt.binding(() => (root.visibilities.dashboard && Config.dashboard.enabled) || root.visible);
|
|
||||||
content.visible = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomClippingRect {
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
active: true
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: false
|
|
||||||
|
active: root.shouldBeActive || root.visible
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
state: root.dashState
|
state: root.dashState
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-74
@@ -11,97 +11,36 @@ Item {
|
|||||||
property int contentHeight
|
property int contentHeight
|
||||||
required property var panels
|
required property var panels
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
readonly property bool shouldBeActive: visibilities.dock
|
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
|
||||||
implicitHeight: 0
|
readonly property bool shouldBeActive: visibilities.dock
|
||||||
implicitWidth: content.implicitWidth
|
property real offsetScale: shouldBeActive ? 0 : 1
|
||||||
visible: height > 0
|
|
||||||
|
|
||||||
Behavior on implicitWidth {
|
visible: offsetScale < 1
|
||||||
|
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
|
||||||
|
implicitHeight: content.implicitHeight
|
||||||
|
implicitWidth: content.implicitWidth || 400
|
||||||
|
opacity: 1 - offsetScale
|
||||||
|
|
||||||
|
Behavior on offsetScale {
|
||||||
Anim {
|
Anim {
|
||||||
duration: Appearance.anim.durations.small
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
}
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
}
|
|
||||||
|
|
||||||
onShouldBeActiveChanged: {
|
|
||||||
if (shouldBeActive) {
|
|
||||||
timer.stop();
|
|
||||||
hideAnim.stop();
|
|
||||||
showAnim.start();
|
|
||||||
} else {
|
|
||||||
showAnim.stop();
|
|
||||||
hideAnim.start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SequentialAnimation {
|
|
||||||
id: showAnim
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
duration: Appearance.anim.durations.small
|
|
||||||
easing.bezierCurve: Appearance.anim.curves.expressiveEffects
|
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
to: root.contentHeight
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptAction {
|
|
||||||
script: root.implicitHeight = Qt.binding(() => content.implicitHeight)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SequentialAnimation {
|
|
||||||
id: hideAnim
|
|
||||||
|
|
||||||
ScriptAction {
|
|
||||||
script: root.implicitHeight = root.implicitHeight
|
|
||||||
}
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
easing.bezierCurve: Appearance.anim.curves.expressiveEffects
|
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
to: 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: timer
|
|
||||||
|
|
||||||
interval: Appearance.anim.durations.small
|
|
||||||
|
|
||||||
onRunningChanged: {
|
|
||||||
if (running && !root.shouldBeActive) {
|
|
||||||
content.visible = false;
|
|
||||||
content.active = true;
|
|
||||||
} else {
|
|
||||||
content.active = Qt.binding(() => root.shouldBeActive || root.visible);
|
|
||||||
content.visible = true;
|
|
||||||
if (showAnim.running) {
|
|
||||||
showAnim.stop();
|
|
||||||
showAnim.start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
active: false
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
visible: false
|
|
||||||
|
active: root.shouldBeActive || root.visible
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
panels: root.panels
|
panels: root.panels
|
||||||
screen: root.screen
|
screen: root.screen
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
|
|
||||||
Component.onCompleted: root.contentHeight = implicitHeight
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: timer.start()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,53 +21,27 @@ Item {
|
|||||||
}
|
}
|
||||||
required property var panels
|
required property var panels
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
readonly property bool shouldBeActive: visibilities.launcher
|
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
readonly property bool shouldBeActive: visibilities.launcher
|
||||||
|
property real offsetScale: shouldBeActive ? 0 : 1
|
||||||
|
|
||||||
implicitHeight: 0
|
visible: offsetScale < 1
|
||||||
implicitWidth: content.implicitWidth
|
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
|
||||||
visible: height > 0
|
implicitHeight: contentHeight
|
||||||
|
implicitWidth: content.implicitWidth || 400
|
||||||
|
opacity: 1 - offsetScale
|
||||||
|
|
||||||
|
Behavior on offsetScale {
|
||||||
|
Anim {
|
||||||
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMaxHeightChanged: timer.start()
|
onMaxHeightChanged: timer.start()
|
||||||
onShouldBeActiveChanged: {
|
onShouldBeActiveChanged: {
|
||||||
if (shouldBeActive) {
|
if (shouldBeActive) {
|
||||||
timer.stop();
|
timer.stop();
|
||||||
hideAnim.stop();
|
|
||||||
showAnim.start();
|
|
||||||
} else {
|
|
||||||
showAnim.stop();
|
|
||||||
hideAnim.start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SequentialAnimation {
|
|
||||||
id: showAnim
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
duration: Appearance.anim.durations.small
|
|
||||||
easing.bezierCurve: Appearance.anim.curves.expressiveEffects
|
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
to: root.contentHeight
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptAction {
|
|
||||||
script: root.implicitHeight = Qt.binding(() => content.implicitHeight)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SequentialAnimation {
|
|
||||||
id: hideAnim
|
|
||||||
|
|
||||||
ScriptAction {
|
|
||||||
script: root.implicitHeight = root.implicitHeight
|
|
||||||
}
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
easing.bezierCurve: Appearance.anim.curves.expressiveEffects
|
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
to: 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,10 +79,6 @@ Item {
|
|||||||
root.contentHeight = Math.min(root.maxHeight, content.implicitHeight);
|
root.contentHeight = Math.min(root.maxHeight, content.implicitHeight);
|
||||||
content.active = Qt.binding(() => root.shouldBeActive || root.visible);
|
content.active = Qt.binding(() => root.shouldBeActive || root.visible);
|
||||||
content.visible = true;
|
content.visible = true;
|
||||||
if (showAnim.running) {
|
|
||||||
showAnim.stop();
|
|
||||||
showAnim.start();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,7 +89,6 @@ Item {
|
|||||||
active: false
|
active: false
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
visible: false
|
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
maxHeight: root.maxHeight
|
maxHeight: root.maxHeight
|
||||||
|
|||||||
@@ -20,69 +20,29 @@ Item {
|
|||||||
required property Item sidebar
|
required property Item sidebar
|
||||||
required property var visibilities
|
required property var visibilities
|
||||||
|
|
||||||
implicitHeight: 0
|
property real offsetScale: shouldBeActive ? 0 : 1
|
||||||
implicitWidth: sidebar.visible ? sidebar.width : Config.utilities.sizes.width
|
|
||||||
visible: height > 0
|
|
||||||
|
|
||||||
states: State {
|
visible: offsetScale < 1
|
||||||
name: "visible"
|
anchors.bottomMargin: (-implicitHeight - 5) * offsetScale
|
||||||
when: root.shouldBeActive
|
implicitHeight: content.implicitHeight + 8 * 2
|
||||||
|
implicitWidth: sidebar.width * (1 - sidebar.offsetScale)
|
||||||
PropertyChanges {
|
opacity: 1 - offsetScale
|
||||||
root.implicitHeight: content.implicitHeight + 8 * 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
from: ""
|
|
||||||
to: "visible"
|
|
||||||
|
|
||||||
|
Behavior on offsetScale {
|
||||||
Anim {
|
Anim {
|
||||||
duration: MaterialEasing.expressiveEffectsTime
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Transition {
|
|
||||||
from: "visible"
|
|
||||||
to: ""
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
onStateChanged: {
|
|
||||||
if (state === "visible" && timer.running) {
|
|
||||||
timer.triggered();
|
|
||||||
timer.stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: timer
|
|
||||||
|
|
||||||
interval: 1000
|
|
||||||
running: true
|
|
||||||
|
|
||||||
onTriggered: {
|
|
||||||
content.active = Qt.binding(() => root.shouldBeActive || root.visible);
|
|
||||||
content.visible = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
active: true
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.margins: 8
|
anchors.margins: 8
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
visible: false
|
|
||||||
|
active: root.shouldBeActive || root.visible
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
implicitWidth: root.implicitWidth - 8 * 2
|
implicitWidth: root.implicitWidth - 8 * 2
|
||||||
|
|||||||
@@ -12,57 +12,36 @@ Item {
|
|||||||
}
|
}
|
||||||
required property var visibilities
|
required property var visibilities
|
||||||
|
|
||||||
implicitWidth: 0
|
readonly property bool shouldBeActive: root.visibilities.sidebar && Config.sidebar.enabled
|
||||||
visible: width > 0
|
property real offsetScale: shouldBeActive ? 0 : 1
|
||||||
|
|
||||||
states: State {
|
visible: offsetScale < 1
|
||||||
name: "visible"
|
anchors.rightMargin: (-implicitWidth - 5) * offsetScale
|
||||||
when: root.visibilities.sidebar
|
implicitWidth: Config.sidebar.sizes.width
|
||||||
|
opacity: 1 - offsetScale
|
||||||
PropertyChanges {
|
|
||||||
root.implicitWidth: Config.sidebar.sizes.width
|
|
||||||
}
|
|
||||||
}
|
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
from: ""
|
|
||||||
to: "visible"
|
|
||||||
|
|
||||||
|
Behavior on offsetScale {
|
||||||
Anim {
|
Anim {
|
||||||
duration: MaterialEasing.expressiveEffectsTime
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
property: "implicitWidth"
|
|
||||||
target: root
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Transition {
|
|
||||||
from: "visible"
|
|
||||||
to: ""
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
|
||||||
property: "implicitWidth"
|
|
||||||
target: root
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
active: true
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 0
|
anchors.bottomMargin: 0
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.margins: 8
|
anchors.margins: 8
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
||||||
|
active: root.shouldBeActive || root.visible
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
implicitWidth: Config.sidebar.sizes.width - 8 * 2
|
implicitWidth: Config.sidebar.sizes.width - 8 * 2
|
||||||
props: root.props
|
props: root.props
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: active = Qt.binding(() => (root.visibilities.sidebar && Config.sidebar.enabled) || root.visible)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ Item {
|
|||||||
}
|
}
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
Anim {
|
Anim {
|
||||||
duration: MaterialEasing.expressiveEffectsTime
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
property: "implicitHeight"
|
property: "implicitHeight"
|
||||||
target: root
|
target: root
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-35
@@ -26,40 +26,22 @@ Item {
|
|||||||
timer.restart();
|
timer.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property real offsetScale: shouldBeActive ? 0 : 1
|
||||||
|
required property bool sidebarOrSessionVisible
|
||||||
|
property real sidebarOffset: sidebarOrSessionVisible ? 12 : 0
|
||||||
|
|
||||||
|
visible: offsetScale < 1
|
||||||
|
anchors.rightMargin: (-implicitWidth - 5 - sidebarOffset) * offsetScale
|
||||||
|
implicitWidth: content.implicitWidth
|
||||||
implicitHeight: content.implicitHeight
|
implicitHeight: content.implicitHeight
|
||||||
implicitWidth: 0
|
opacity: 1 - offsetScale
|
||||||
visible: width > 0
|
|
||||||
|
|
||||||
states: State {
|
|
||||||
name: "visible"
|
|
||||||
when: root.shouldBeActive
|
|
||||||
|
|
||||||
PropertyChanges {
|
|
||||||
root.implicitWidth: content.implicitWidth
|
|
||||||
}
|
|
||||||
}
|
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
from: ""
|
|
||||||
to: "visible"
|
|
||||||
|
|
||||||
|
Behavior on offsetScale {
|
||||||
Anim {
|
Anim {
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
property: "implicitWidth"
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
target: root
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Transition {
|
|
||||||
from: "visible"
|
|
||||||
to: ""
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
|
||||||
property: "implicitWidth"
|
|
||||||
target: root
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
volume = Audio.volume;
|
volume = Audio.volume;
|
||||||
@@ -113,15 +95,14 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomClippingRect {
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
active: root.shouldBeActive || root.visible
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
brightness: root.brightness
|
brightness: root.brightness
|
||||||
monitor: root.monitor
|
monitor: root.monitor
|
||||||
@@ -131,8 +112,5 @@ Item {
|
|||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
volume: root.volume
|
volume: root.volume
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: active = Qt.binding(() => root.shouldBeActive || root.visible)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,76 +11,33 @@ Item {
|
|||||||
readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0
|
readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
|
||||||
implicitHeight: 0
|
readonly property bool shouldBeActive: root.visibilities.resources
|
||||||
implicitWidth: content.implicitWidth
|
property real offsetScale: shouldBeActive ? 0 : 1
|
||||||
visible: height > 0
|
|
||||||
|
|
||||||
states: State {
|
visible: offsetScale < 1
|
||||||
name: "visible"
|
anchors.topMargin: (-implicitHeight - 5) * offsetScale
|
||||||
when: root.visibilities.resources
|
implicitHeight: content.implicitHeight
|
||||||
|
implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open
|
||||||
PropertyChanges {
|
opacity: 1 - offsetScale
|
||||||
root.implicitHeight: content.implicitHeight
|
|
||||||
}
|
|
||||||
}
|
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
from: ""
|
|
||||||
to: "visible"
|
|
||||||
|
|
||||||
|
Behavior on offsetScale {
|
||||||
Anim {
|
Anim {
|
||||||
duration: MaterialEasing.expressiveEffectsTime
|
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Transition {
|
|
||||||
from: "visible"
|
|
||||||
to: ""
|
|
||||||
|
|
||||||
Anim {
|
|
||||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
|
||||||
property: "implicitHeight"
|
|
||||||
target: root
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
|
|
||||||
onStateChanged: {
|
|
||||||
if (state === "visible" && timer.running) {
|
|
||||||
timer.triggered();
|
|
||||||
timer.stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: timer
|
|
||||||
|
|
||||||
interval: Appearance.anim.durations.extraLarge
|
|
||||||
running: true
|
|
||||||
|
|
||||||
onTriggered: {
|
|
||||||
content.active = Qt.binding(() => (root.visibilities.resources) || root.visible);
|
|
||||||
content.visible = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomClippingRect {
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
active: true
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: false
|
|
||||||
|
active: root.shouldBeActive || root.visible
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
padding: Appearance.padding.normal
|
padding: Appearance.padding.normal
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user