fix: column index desync after reorder
This commit is contained in:
@@ -12,7 +12,7 @@ Item {
|
||||
id: root
|
||||
|
||||
readonly property real nonAnimWidth: view.implicitWidth + clipWrapper.anchors.margins * 2
|
||||
readonly property real nonAnimHeight: tabs.implicitHeight + clipWrapper.anchors.topMargin + view.implicitHeight + clipWrapper.anchors.margins * 2
|
||||
readonly property real nonAnimHeight: tabs.implicitHeight + tabs.anchors.topMargin + view.implicitHeight + clipWrapper.anchors.margins + clipWrapper.anchors.topMargin
|
||||
|
||||
required property ScreenState screenState
|
||||
|
||||
@@ -22,25 +22,25 @@ Item {
|
||||
component: dashComponent,
|
||||
iconName: "dashboard",
|
||||
text: qsTr("Dashboard"),
|
||||
enabled: true
|
||||
enabled: Config.dashboard.showDashboard
|
||||
},
|
||||
{
|
||||
component: weatherComponent,
|
||||
iconName: "cloud",
|
||||
text: qsTr("Weather"),
|
||||
enabled: true
|
||||
enabled: Config.dashboard.showWeather
|
||||
},
|
||||
{
|
||||
component: mediaComponent,
|
||||
iconName: "queue_music",
|
||||
text: qsTr("Media"),
|
||||
enabled: true
|
||||
enabled: Config.dashboard.showMedia
|
||||
},
|
||||
{
|
||||
component: procsComponent,
|
||||
iconName: "speed",
|
||||
text: qsTr("Processes"),
|
||||
enabled: true
|
||||
enabled: Config.dashboard.showProcesses
|
||||
},
|
||||
];
|
||||
return allTabs.filter(tab => tab.enabled);
|
||||
@@ -60,33 +60,34 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: clipWrapper
|
||||
anchors.fill: parent
|
||||
anchors.margins: Tokens.padding.small
|
||||
// radius: Tokens.rounding.extraLarge - anchors.margins
|
||||
Tabs {
|
||||
id: tabs
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
nonAnimWidth: view.implicitWidth
|
||||
screenState: root.screenState
|
||||
tabs: root.dashboardTabs
|
||||
anchors.topMargin: ZUtils.clamp(anchors.margins - Config.bar.border, 0, anchors.margins)
|
||||
anchors.margins: Tokens.padding.small
|
||||
}
|
||||
|
||||
Tabs {
|
||||
id: tabs
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
nonAnimWidth: view.implicitWidth
|
||||
screenState: root.screenState
|
||||
tabs: root.dashboardTabs
|
||||
}
|
||||
CustomClippingRect {
|
||||
id: clipWrapper
|
||||
anchors.top: tabs.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.topMargin: Tokens.spacing.small
|
||||
anchors.margins: Tokens.padding.small
|
||||
radius: Tokens.rounding.extraLarge - anchors.margins
|
||||
|
||||
Item {
|
||||
id: viewWrapper
|
||||
|
||||
anchors.top: tabs.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.topMargin: Tokens.spacing.small
|
||||
anchors.fill: parent
|
||||
|
||||
Flickable {
|
||||
id: view
|
||||
|
||||
Reference in New Issue
Block a user