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:
parent
c956f3c4ef
commit
752574cfdb
|
@ -45,25 +45,23 @@ SettingsContentBase {
|
||||||
profilePreview.reload()
|
profilePreview.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bottomHeaderComponents: StatusTabBar {
|
||||||
|
id: editPreviwTabBar
|
||||||
|
StatusTabButton {
|
||||||
|
width: implicitWidth
|
||||||
|
text: qsTr("Edit")
|
||||||
|
}
|
||||||
|
StatusTabButton {
|
||||||
|
width: implicitWidth
|
||||||
|
text: qsTr("Preview")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: layout
|
id: layout
|
||||||
spacing: Constants.settingsSection.itemSpacing
|
spacing: Constants.settingsSection.itemSpacing
|
||||||
width: root.contentWidth
|
width: root.contentWidth
|
||||||
|
|
||||||
StatusTabBar {
|
|
||||||
id: editPreviwTabBar
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
StatusTabButton {
|
|
||||||
width: implicitWidth
|
|
||||||
text: qsTr("Edit")
|
|
||||||
}
|
|
||||||
StatusTabButton {
|
|
||||||
width: implicitWidth
|
|
||||||
text: qsTr("Preview")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StackLayout {
|
StackLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
currentIndex: editPreviwTabBar.currentIndex
|
currentIndex: editPreviwTabBar.currentIndex
|
||||||
|
|
|
@ -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,33 +54,42 @@ 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
|
||||||
text: root.sectionTitle
|
text: root.sectionTitle
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
font.pixelSize: Constants.settingsSection.mainHeaderFontSize
|
font.pixelSize: Constants.settingsSection.mainHeaderFontSize
|
||||||
color: Theme.palette.directColor1
|
color: Theme.palette.directColor1
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: loader
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Control {
|
||||||
Loader {
|
id: secondHeaderRow
|
||||||
id: loader
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue