fix:(Settings): Added bottom row components in header

* Made tab bar in Profile Settings non scrollable with
the rest of the content

Closes #7525
This commit is contained in:
Alexandra Betouni 2022-10-20 16:41:18 +03:00 committed by Alexandra Betouni
parent c956f3c4ef
commit 752574cfdb
2 changed files with 39 additions and 31 deletions

View File

@ -45,15 +45,8 @@ SettingsContentBase {
profilePreview.reload() profilePreview.reload()
} }
ColumnLayout { bottomHeaderComponents: StatusTabBar {
id: layout
spacing: Constants.settingsSection.itemSpacing
width: root.contentWidth
StatusTabBar {
id: editPreviwTabBar id: editPreviwTabBar
Layout.fillWidth: true
StatusTabButton { StatusTabButton {
width: implicitWidth width: implicitWidth
text: qsTr("Edit") text: qsTr("Edit")
@ -64,6 +57,11 @@ SettingsContentBase {
} }
} }
ColumnLayout {
id: layout
spacing: Constants.settingsSection.itemSpacing
width: root.contentWidth
StackLayout { StackLayout {
Layout.fillWidth: true Layout.fillWidth: true
currentIndex: editPreviwTabBar.currentIndex currentIndex: editPreviwTabBar.currentIndex

View File

@ -18,6 +18,7 @@ Item {
property alias titleRowComponentLoader: loader property alias titleRowComponentLoader: loader
property list<Item> headerComponents property list<Item> headerComponents
property alias bottomHeaderComponents: secondHeaderRow.contentItem
default property Item content default property Item content
property bool dirty: false property bool dirty: false
@ -53,13 +54,16 @@ Item {
} }
} }
RowLayout { ColumnLayout {
id: titleRow id: titleRow
anchors.left: parent.left width: root.contentWidth
anchors.leftMargin: Style.current.padding height: childrenRect.height
width: visible ? root.contentWidth - Style.current.padding : 0 spacing: 0
height: visible ? d.titleRowHeight : 0 RowLayout {
visible: root.sectionTitle !== "" Layout.preferredWidth: (parent.width - Style.current.padding)
Layout.preferredHeight: visible ? d.titleRowHeight : 0
Layout.leftMargin: Style.current.padding
visible: (root.sectionTitle !== "")
StatusBaseText { StatusBaseText {
Layout.fillWidth: true Layout.fillWidth: true
@ -73,13 +77,19 @@ Item {
id: loader id: loader
} }
} }
Control {
id: secondHeaderRow
Layout.fillWidth: true
visible: !!contentItem
}
}
StatusScrollView { StatusScrollView {
id: scrollView id: scrollView
objectName: "settingsContentBaseScrollView" objectName: "settingsContentBaseScrollView"
anchors.top: titleRow.visible ? titleRow.bottom : parent.top anchors.top: titleRow.bottom
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.topMargin: Style.current.bigPadding anchors.topMargin: Style.current.padding
padding: 0 padding: 0
width: root.contentWidth width: root.contentWidth