dashboard: fix tab indicator offset

This commit is contained in:
2 * r + 2 * t 2025-06-19 16:39:59 +10:00
parent e36fb678db
commit 554892a363
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ Item {
anchors.topMargin: Appearance.padding.normal
anchors.margins: Appearance.padding.large
nonAnimWidth: root.nonAnimWidth
nonAnimWidth: root.nonAnimWidth - anchors.margins * 2
currentIndex: view.currentIndex
}

View file

@ -55,7 +55,7 @@ Item {
x: {
const tab = bar.currentItem;
const width = (root.nonAnimWidth - Config.dashboard.sizes.tabIndicatorSpacing * (bar.count - 1) * 2) / bar.count;
const width = (root.nonAnimWidth - bar.spacing * (bar.count - 1)) / bar.count;
return width * tab.TabBar.index + (width - tab.implicitWidth) / 2;
}