mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-01-28 22:01:50 +00:00
[Linux] Add settings page (empty)
This commit is contained in:
committed by
Tim Gromeyer
parent
eacd862ef3
commit
3aeff4d986
@@ -31,6 +31,7 @@ qt_add_qml_module(applinux
|
||||
BatteryIndicator.qml
|
||||
SegmentedControl.qml
|
||||
PodColumn.qml
|
||||
Icon.qml
|
||||
)
|
||||
|
||||
# Add the resource file
|
||||
@@ -46,6 +47,7 @@ qt_add_resources(applinux "resources"
|
||||
assets/podpro.png
|
||||
assets/podpro_case.png
|
||||
assets/podmax.png
|
||||
assets/fonts/SF-Symbols-6.ttf
|
||||
)
|
||||
|
||||
target_link_libraries(applinux
|
||||
|
||||
13
linux/Icon.qml
Normal file
13
linux/Icon.qml
Normal file
@@ -0,0 +1,13 @@
|
||||
// Icon.qml
|
||||
import QtQuick 2.15
|
||||
|
||||
Text {
|
||||
property string icon: ""
|
||||
font.family: iconFont.name
|
||||
text: icon
|
||||
|
||||
FontLoader {
|
||||
id: iconFont
|
||||
source: "qrc:/icons/assets/fonts/SF-Symbols-6.ttf"
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
@@ -10,6 +12,33 @@ ApplicationWindow {
|
||||
|
||||
onClosing: mainWindow.visible = false
|
||||
|
||||
// Mouse area for handling back/forward navigation
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.BackButton | Qt.ForwardButton
|
||||
onClicked: (mouse) => {
|
||||
if (mouse.button === Qt.BackButton && stackView.depth > 1) {
|
||||
stackView.pop()
|
||||
} else if (mouse.button === Qt.ForwardButton) {
|
||||
console.log("Forward button pressed")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StackView {
|
||||
id: stackView
|
||||
anchors.fill: parent
|
||||
initialItem: mainPage
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: iconFont
|
||||
source: "qrc:/icons/assets/fonts/SF-Symbols-6.ttf"
|
||||
}
|
||||
|
||||
Component {
|
||||
id: mainPage
|
||||
Item {
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
spacing: 20
|
||||
@@ -107,6 +136,7 @@ ApplicationWindow {
|
||||
spacing: 10
|
||||
|
||||
TextField {
|
||||
id: newNameField
|
||||
placeholderText: airPodsTrayApp.deviceName
|
||||
maximumLength: 32
|
||||
}
|
||||
@@ -117,4 +147,46 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RoundButton {
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 10
|
||||
font.family: iconFont.name
|
||||
font.pixelSize: 18
|
||||
text: "\uf958" // U+F958
|
||||
onClicked: stackView.push(settingsPage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: settingsPage
|
||||
Item {
|
||||
// Add your settings page content here
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
spacing: 20
|
||||
padding: 20
|
||||
|
||||
Label {
|
||||
text: "Settings Page"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Floating back button
|
||||
RoundButton {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.margins: 10
|
||||
font.family: iconFont.name
|
||||
font.pixelSize: 18
|
||||
text: "\uecb1" // U+ECB1
|
||||
onClicked: stackView.pop()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
linux/assets/fonts/SF-Symbols-6.ttf
Normal file
BIN
linux/assets/fonts/SF-Symbols-6.ttf
Normal file
Binary file not shown.
Reference in New Issue
Block a user