diff options
| author | Tim Hämisch <tim@thaemisch.net> | 2025-06-15 13:40:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-15 13:40:47 +0200 |
| commit | 68874082b4cfee63feaecc0640646ad0ba753da7 (patch) | |
| tree | 815a1113a4bd83373283253a35f0220a08a8cfe6 /modules/dashboard/Tabs.qml | |
| parent | launcher: use standard logout command (diff) | |
| parent | dashboard: fix uptime (diff) | |
| download | caelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.tar.gz caelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.tar.bz2 caelestia-shell-68874082b4cfee63feaecc0640646ad0ba753da7.zip | |
Merge branch 'main' into betteractions
Diffstat (limited to 'modules/dashboard/Tabs.qml')
| -rw-r--r-- | modules/dashboard/Tabs.qml | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/modules/dashboard/Tabs.qml b/modules/dashboard/Tabs.qml index 46cbd76..e678e6a 100644 --- a/modules/dashboard/Tabs.qml +++ b/modules/dashboard/Tabs.qml @@ -48,14 +48,14 @@ Item { id: indicator anchors.top: bar.bottom - anchors.topMargin: DashboardConfig.sizes.tabIndicatorSpacing + anchors.topMargin: Config.dashboard.sizes.tabIndicatorSpacing implicitWidth: bar.currentItem.implicitWidth - implicitHeight: DashboardConfig.sizes.tabIndicatorHeight + implicitHeight: Config.dashboard.sizes.tabIndicatorHeight x: { const tab = bar.currentItem; - const width = (root.nonAnimWidth - DashboardConfig.sizes.tabIndicatorSpacing * (bar.count - 1) * 2) / bar.count + const width = (root.nonAnimWidth - Config.dashboard.sizes.tabIndicatorSpacing * (bar.count - 1) * 2) / bar.count; return width * tab.TabBar.index + (width - tab.implicitWidth) / 2; } @@ -69,7 +69,6 @@ Item { color: Colours.palette.m3primary radius: Appearance.rounding.full - } Behavior on x { @@ -108,14 +107,17 @@ Item { cursorShape: Qt.PointingHandCursor - onPressed: ({x,y}) => { + onPressed: ({ + x, + y + }) => { tab.TabBar.tabBar.setCurrentIndex(tab.TabBar.index); const stateY = stateWrapper.y; rippleAnim.x = x; rippleAnim.y = y - stateY; - const dist = (ox,oy) => ox * ox + oy * oy; + const dist = (ox, oy) => ox * ox + oy * oy; const stateEndY = stateY + stateWrapper.height; rippleAnim.radius = Math.sqrt(Math.max(dist(0, stateY), dist(0, stateEndY), dist(width, stateY), dist(width, stateEndY))); @@ -176,7 +178,7 @@ Item { anchors.left: parent.left anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - implicitHeight: parent.height + DashboardConfig.sizes.tabIndicatorSpacing * 2 + implicitHeight: parent.height + Config.dashboard.sizes.tabIndicatorSpacing * 2 color: "transparent" radius: Appearance.rounding.small @@ -237,7 +239,6 @@ Item { text: tab.text color: tab.current ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant } - } } |