Blob bounciness #67

Merged
zach merged 9 commits from bounce-test into main 2026-04-22 00:01:47 +02:00
3 changed files with 63 additions and 28 deletions
Showing only changes of commit c3f877c19e - Show all commits
+33
View File
@@ -20,6 +20,7 @@ Item {
required property Item bar required property Item bar
readonly property alias dashboard: dashboard readonly property alias dashboard: dashboard
readonly property alias dashboardWrapper: dashboardWrapper
readonly property alias dock: dock readonly property alias dock: dock
readonly property alias drawing: drawing readonly property alias drawing: drawing
required property Canvas drawingItem required property Canvas drawingItem
@@ -30,6 +31,7 @@ Item {
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
readonly property alias resourcesWrapper: resourcesWrapper
required property ShellScreen screen required property ShellScreen screen
readonly property alias settings: settings readonly property alias settings: settings
readonly property alias sidebar: sidebar readonly property alias sidebar: sidebar
@@ -41,6 +43,15 @@ Item {
anchors.margins: Config.barConfig.border anchors.margins: Config.barConfig.border
anchors.topMargin: bar.implicitHeight anchors.topMargin: bar.implicitHeight
Item {
id: resourcesWrapper
anchors.left: parent.left
anchors.top: parent.top
clip: true
implicitHeight: resources.implicitHeight
implicitWidth: resources.implicitWidth
Resources.Wrapper { Resources.Wrapper {
id: resources id: resources
@@ -48,6 +59,7 @@ Item {
anchors.top: parent.top anchors.top: parent.top
visibilities: root.visibilities visibilities: root.visibilities
} }
}
Item { Item {
id: osdWrapper id: osdWrapper
@@ -125,13 +137,34 @@ Item {
visibilities: root.visibilities visibilities: root.visibilities
} }
Item {
id: dashboardWrapper
property real offsetScale: dashboard.shouldBeActive ? 0 : 1
anchors.right: parent.right
anchors.top: parent.top
clip: true
implicitHeight: dashboard.implicitHeight * (1 - offsetScale)
implicitWidth: dashboard.implicitWidth
Behavior on offsetScale {
Anim {
duration: Appearance.anim.durations.expressiveDefaultSpatial
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
}
}
Dashboard.Wrapper { Dashboard.Wrapper {
id: dashboard id: dashboard
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: (-implicitHeight - 5) * offsetScale
offsetScale: dashboardWrapper.offsetScale
visibilities: root.visibilities visibilities: root.visibilities
} }
}
Sidebar.Wrapper { Sidebar.Wrapper {
id: sidebar id: sidebar
+20 -9
View File
@@ -170,15 +170,19 @@ Variants {
PanelBg { PanelBg {
id: dashBg id: dashBg
deformAmount: 0.15 * Config.appearance.deform.scale deformAmount: 0.08 * Config.appearance.deform.scale
implicitHeight: panels.dashboard.height
implicitWidth: panels.dashboard.width
panel: panels.dashboard panel: panels.dashboard
radius: Appearance.rounding.normal radius: Appearance.rounding.normal
x: panels.dashboardWrapper.x + panels.dashboard.x + Config.barConfig.border
y: panels.dashboardWrapper.y + panels.dashboard.y + bar.implicitHeight
} }
PanelBg { PanelBg {
id: launcherBg id: launcherBg
deformAmount: 0.15 * Config.appearance.deform.scale deformAmount: 0.08 * Config.appearance.deform.scale
panel: panels.launcher panel: panels.launcher
radius: Appearance.rounding.smallest + 5 radius: Appearance.rounding.smallest + 5
} }
@@ -187,7 +191,7 @@ Variants {
id: sidebarBg id: sidebarBg
bottomLeftRadius: 0 bottomLeftRadius: 0
deformAmount: 0.1 * Config.appearance.deform.scale deformAmount: 0.08 * 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,10 +201,12 @@ Variants {
id: osdBg id: osdBg
deformAmount: 0.1 * Config.appearance.deform.scale deformAmount: 0.1 * Config.appearance.deform.scale
implicitHeight: panels.osd.height
implicitWidth: panels.osd.width implicitWidth: panels.osd.width
panel: panels.osdWrapper panel: panels.osd
radius: 20 radius: 20
x: panels.osdWrapper.x + panels.osd.x + Config.barConfig.border x: panels.osdWrapper.x + panels.osd.x + Config.barConfig.border
y: panels.osdWrapper.y + panels.osd.y + bar.implicitHeight
} }
PanelBg { PanelBg {
@@ -225,9 +231,10 @@ Variants {
deformAmount: panels.popouts.isDetached ? 0.05 * Config.appearance.deform.scale : panels.popouts.hasCurrent ? 0.15 * Config.appearance.deform.scale : 0.1 * Config.appearance.deform.scale deformAmount: panels.popouts.isDetached ? 0.05 * Config.appearance.deform.scale : panels.popouts.hasCurrent ? 0.15 * Config.appearance.deform.scale : 0.1 * Config.appearance.deform.scale
implicitHeight: panels.popouts.height * (1 + extraHeight) implicitHeight: panels.popouts.height * (1 + extraHeight)
implicitWidth: panels.popoutsWrapper.width implicitWidth: panels.popouts.width
panel: panels.popoutsWrapper panel: panels.popouts
radius: (panels.popouts.currentName.startsWith("audio") || panels.popouts.currentName.startsWith("updates")) ? Appearance.rounding.normal : Appearance.rounding.smallest radius: (panels.popouts.currentName.startsWith("audio") || panels.popouts.currentName.startsWith("updates")) ? Appearance.rounding.normal : Appearance.rounding.smallest
x: panels.popoutsWrapper.x + panels.popouts.x + Config.barConfig.border
y: panels.popoutsWrapper.y + panels.popouts.y + bar.implicitHeight - panels.popouts.height * extraHeight y: panels.popoutsWrapper.y + panels.popouts.y + bar.implicitHeight - panels.popouts.height * extraHeight
Behavior on extraHeight { Behavior on extraHeight {
@@ -239,15 +246,19 @@ Variants {
PanelBg { PanelBg {
id: resourcesBg id: resourcesBg
deformAmount: 0.15 * Config.appearance.deform.scale deformAmount: 0.08 * Config.appearance.deform.scale
implicitHeight: panels.resources.height
implicitWidth: panels.resources.width
panel: panels.resources panel: panels.resources
radius: Appearance.rounding.normal radius: Appearance.rounding.normal
x: panels.resourcesWrapper.x + panels.resources.x + Config.barConfig.border
y: panels.resourcesWrapper.y + panels.resources.y + bar.implicitHeight
} }
PanelBg { PanelBg {
id: settingsBg id: settingsBg
deformAmount: 0.1 * Config.appearance.deform.scale deformAmount: 0.08 * Config.appearance.deform.scale
panel: panels.settings panel: panels.settings
radius: Appearance.rounding.large radius: Appearance.rounding.large
topLeftRadius: Appearance.rounding.large + Appearance.padding.smaller topLeftRadius: Appearance.rounding.large + Appearance.padding.smaller
@@ -257,7 +268,7 @@ Variants {
PanelBg { PanelBg {
id: dockBg id: dockBg
deformAmount: 0.15 * Config.appearance.deform.scale deformAmount: 0.08 * Config.appearance.deform.scale
panel: panels.dock panel: panels.dock
radius: Appearance.rounding.normal radius: Appearance.rounding.normal
} }
+4 -13
View File
@@ -15,32 +15,23 @@ Item {
reloadableId: "dashboardState" reloadableId: "dashboardState"
} }
readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0 readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0
required property real offsetScale
readonly property bool shouldBeActive: root.visibilities.dashboard && Config.dashboard.enabled
required property PersistentProperties visibilities required property PersistentProperties visibilities
readonly property bool shouldBeActive: root.visibilities.dashboard && Config.dashboard.enabled
property real offsetScale: shouldBeActive ? 0 : 1
visible: offsetScale < 1
anchors.topMargin: (-implicitHeight - 5) * offsetScale
implicitHeight: content.implicitHeight implicitHeight: content.implicitHeight
implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open
opacity: 1 - offsetScale opacity: 1 - offsetScale
Behavior on offsetScale { // visible: offsetScale < 1
Anim {
duration: Appearance.anim.durations.expressiveDefaultSpatial
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
}
}
Loader { Loader {
id: content id: content
active: root.shouldBeActive || root.visible
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
active: root.shouldBeActive || root.visible
sourceComponent: Content { sourceComponent: Content {
state: root.dashState state: root.dashState
visibilities: root.visibilities visibilities: root.visibilities