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()
}
ColumnLayout {
id: layout
spacing: Constants.settingsSection.itemSpacing
width: root.contentWidth
StatusTabBar {
bottomHeaderComponents: StatusTabBar {
id: editPreviwTabBar
Layout.fillWidth: true
StatusTabButton {
width: implicitWidth
text: qsTr("Edit")
@ -64,6 +57,11 @@ SettingsContentBase {
}
}
ColumnLayout {
id: layout
spacing: Constants.settingsSection.itemSpacing
width: root.contentWidth
StackLayout {
Layout.fillWidth: true
currentIndex: editPreviwTabBar.currentIndex

View File

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