Settings: large cleanup and factorization. Should look much better.
This commit is contained in:
parent
1206be34dc
commit
8302285388
21 changed files with 2434 additions and 2937 deletions
|
|
@ -267,7 +267,7 @@ NPanel {
|
|||
// Tab label on the main right side
|
||||
NText {
|
||||
text: root.tabsModel[currentTabIndex].label
|
||||
font.pointSize: Style.fontSizeL * scaling
|
||||
font.pointSize: Style.fontSizeXL * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Color.mPrimary
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -287,21 +287,28 @@ NPanel {
|
|||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
clip: true
|
||||
|
||||
Repeater {
|
||||
model: root.tabsModel
|
||||
|
||||
onItemAdded: function (index, item) {
|
||||
item.sourceComponent = root.tabsModel[index].source
|
||||
}
|
||||
|
||||
delegate: Loader {
|
||||
// All loaders will occupy the same space, stacked on top of each other.
|
||||
anchors.fill: parent
|
||||
visible: index === root.currentTabIndex
|
||||
// The loader is only active (and uses memory) when its page is visible.
|
||||
active: visible
|
||||
active: index === root.currentTabIndex
|
||||
sourceComponent: ColumnLayout {
|
||||
ScrollView {
|
||||
id: scrollView
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||
padding: Style.marginL * scaling
|
||||
|
||||
Loader {
|
||||
active: true
|
||||
sourceComponent: root.tabsModel[index].source
|
||||
width: scrollView.availableWidth
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue