forked from Shinonome/dots-hyprland
welcome: refractor content page and sections
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "root:/modules/common/"
|
||||
import "root:/modules/common/widgets/"
|
||||
|
||||
Flickable {
|
||||
id: root
|
||||
default property alias data: contentColumn.data
|
||||
clip: true
|
||||
contentHeight: contentColumn.implicitHeight
|
||||
implicitWidth: contentColumn.implicitWidth
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
margins: 10
|
||||
}
|
||||
spacing: 20
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "root:/modules/common/"
|
||||
import "root:/modules/common/widgets/"
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
property string title
|
||||
default property alias data: sectionContent.data
|
||||
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
StyledText {
|
||||
text: root.title
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
}
|
||||
ColumnLayout {
|
||||
id: sectionContent
|
||||
spacing: 4
|
||||
}
|
||||
}
|
||||
@@ -53,23 +53,6 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
component Section: ColumnLayout {
|
||||
id: sectionRoot
|
||||
property string title
|
||||
default property alias data: sectionContent.data
|
||||
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
StyledText {
|
||||
text: sectionRoot.title
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
}
|
||||
ColumnLayout {
|
||||
id: sectionContent
|
||||
spacing: 5
|
||||
}
|
||||
}
|
||||
|
||||
component ButtonWithIcon: RippleButton {
|
||||
id: buttonWithIconRoot
|
||||
property string nerdIcon
|
||||
@@ -296,22 +279,12 @@ ApplicationWindow {
|
||||
implicitWidth: contentColumn.implicitWidth
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Flickable {
|
||||
clip: true
|
||||
anchors.fill: parent
|
||||
contentHeight: contentColumn.implicitHeight
|
||||
implicitWidth: contentColumn.implicitWidth
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
margins: 10
|
||||
}
|
||||
spacing: 20
|
||||
|
||||
Section {
|
||||
|
||||
ContentPage {
|
||||
id: contentColumn
|
||||
anchors.fill: parent
|
||||
ContentSection {
|
||||
title: "Style & wallpaper"
|
||||
|
||||
ButtonGroup {
|
||||
@@ -385,7 +358,7 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Section {
|
||||
ContentSection {
|
||||
title: "Policies"
|
||||
|
||||
RowLayout {
|
||||
@@ -471,7 +444,7 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Section {
|
||||
ContentSection {
|
||||
title: "Info"
|
||||
|
||||
Flow {
|
||||
@@ -525,7 +498,7 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Section {
|
||||
ContentSection {
|
||||
title: "Useless buttons"
|
||||
|
||||
Flow {
|
||||
@@ -553,8 +526,6 @@ ApplicationWindow {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user