fix: fix weirdness
This commit is contained in:
parent
a498671ef1
commit
d40709952b
7 changed files with 318 additions and 246 deletions
|
|
@ -22,7 +22,7 @@ PanelWindow {
|
||||||
color: visible ? overlayColor : "transparent"
|
color: visible ? overlayColor : "transparent"
|
||||||
visible: false
|
visible: false
|
||||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||||
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||||
screen: (typeof modelData !== 'undefined' ? modelData : null)
|
screen: (typeof modelData !== 'undefined' ? modelData : null)
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
anchors.left: true
|
anchors.left: true
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,6 @@ Singleton {
|
||||||
if (Settings.settings.randomWallpaper) {
|
if (Settings.settings.randomWallpaper) {
|
||||||
randomWallpaperTimer.stop();
|
randomWallpaperTimer.stop();
|
||||||
randomWallpaperTimer.start();
|
randomWallpaperTimer.start();
|
||||||
setRandomWallpaper();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import qs.Settings
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: profileSettingsCard
|
id: profileSettingsCard
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 340
|
Layout.preferredHeight: 500
|
||||||
color: Theme.surface
|
color: Theme.surface
|
||||||
radius: 18
|
radius: 18
|
||||||
border.color: "transparent"
|
border.color: "transparent"
|
||||||
|
|
@ -19,20 +19,20 @@ Rectangle {
|
||||||
anchors.margins: 18
|
anchors.margins: 18
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
||||||
// Profile Image Header
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "person"
|
text: "settings"
|
||||||
font.family: "Material Symbols Outlined"
|
font.family: "Material Symbols Outlined"
|
||||||
font.pixelSize: 20
|
font.pixelSize: 20
|
||||||
color: Theme.accentPrimary
|
color: Theme.accentPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Profile Image"
|
text: "System Settings"
|
||||||
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
|
|
@ -40,83 +40,102 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Profile Image Input Row
|
// Profile Image Input Section
|
||||||
RowLayout {
|
ColumnLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
Rectangle {
|
Text {
|
||||||
width: 36
|
text: "Profile Image"
|
||||||
height: 36
|
font.family: Theme.fontFamily
|
||||||
radius: 18
|
font.pixelSize: 13
|
||||||
color: Theme.surfaceVariant
|
font.bold: true
|
||||||
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
color: Theme.textPrimary
|
||||||
border.width: 1
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: avatarImage
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: 2
|
|
||||||
source: Settings.settings.profileImage
|
|
||||||
fillMode: Image.PreserveAspectCrop
|
|
||||||
visible: false
|
|
||||||
asynchronous: true
|
|
||||||
cache: false
|
|
||||||
sourceSize.width: 64
|
|
||||||
sourceSize.height: 64
|
|
||||||
}
|
|
||||||
OpacityMask {
|
|
||||||
anchors.fill: avatarImage
|
|
||||||
source: avatarImage
|
|
||||||
maskSource: Rectangle {
|
|
||||||
width: avatarImage.width
|
|
||||||
height: avatarImage.height
|
|
||||||
radius: avatarImage.width / 2
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
visible: Settings.settings.profileImage !== ""
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback icon
|
|
||||||
Text {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: "person"
|
|
||||||
font.family: "Material Symbols Outlined"
|
|
||||||
font.pixelSize: 18
|
|
||||||
color: Theme.accentPrimary
|
|
||||||
visible: Settings.settings.profileImage === ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Text input styled exactly like weather city
|
RowLayout {
|
||||||
Rectangle {
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 36
|
|
||||||
radius: 8
|
|
||||||
color: Theme.surfaceVariant
|
|
||||||
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
|
||||||
border.width: 1
|
|
||||||
|
|
||||||
TextInput {
|
Rectangle {
|
||||||
id: profileImageInput
|
width: 40
|
||||||
anchors.fill: parent
|
height: 40
|
||||||
anchors.margins: 12
|
radius: 20
|
||||||
text: Settings.settings.profileImage
|
color: Theme.surfaceVariant
|
||||||
font.pixelSize: 13
|
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||||
color: Theme.textPrimary
|
border.width: 1
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
|
||||||
clip: true
|
Image {
|
||||||
focus: true
|
id: avatarImage
|
||||||
selectByMouse: true
|
|
||||||
activeFocusOnTab: true
|
|
||||||
inputMethodHints: Qt.ImhNone
|
|
||||||
onTextChanged: {
|
|
||||||
Settings.settings.profileImage = text
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
anchors.margins: 2
|
||||||
profileImageInput.forceActiveFocus()
|
source: Settings.settings.profileImage
|
||||||
|
fillMode: Image.PreserveAspectCrop
|
||||||
|
visible: false
|
||||||
|
asynchronous: true
|
||||||
|
cache: false
|
||||||
|
sourceSize.width: 64
|
||||||
|
sourceSize.height: 64
|
||||||
|
}
|
||||||
|
OpacityMask {
|
||||||
|
anchors.fill: avatarImage
|
||||||
|
source: avatarImage
|
||||||
|
maskSource: Rectangle {
|
||||||
|
width: avatarImage.width
|
||||||
|
height: avatarImage.height
|
||||||
|
radius: avatarImage.width / 2
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
visible: Settings.settings.profileImage !== ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallback icon
|
||||||
|
Text {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: "person"
|
||||||
|
font.family: "Material Symbols Outlined"
|
||||||
|
font.pixelSize: 20
|
||||||
|
color: Theme.accentPrimary
|
||||||
|
visible: Settings.settings.profileImage === ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 40
|
||||||
|
radius: 8
|
||||||
|
color: Theme.surfaceVariant
|
||||||
|
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||||
|
border.width: 1
|
||||||
|
|
||||||
|
TextInput {
|
||||||
|
id: profileImageInput
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.leftMargin: 12
|
||||||
|
anchors.rightMargin: 12
|
||||||
|
anchors.topMargin: 6
|
||||||
|
anchors.bottomMargin: 6
|
||||||
|
text: Settings.settings.profileImage
|
||||||
|
font.family: Theme.fontFamily
|
||||||
|
font.pixelSize: 13
|
||||||
|
color: Theme.textPrimary
|
||||||
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
|
clip: true
|
||||||
|
focus: true
|
||||||
|
selectByMouse: true
|
||||||
|
activeFocusOnTab: true
|
||||||
|
inputMethodHints: Qt.ImhNone
|
||||||
|
onTextChanged: {
|
||||||
|
Settings.settings.profileImage = text
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: {
|
||||||
|
profileImageInput.forceActiveFocus()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -127,9 +146,11 @@ Rectangle {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 8
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Show Active Window Icon"
|
text: "Show Active Window Icon"
|
||||||
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
|
|
@ -148,7 +169,7 @@ Rectangle {
|
||||||
color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.surfaceVariant
|
color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.surfaceVariant
|
||||||
border.color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.outline
|
border.color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.outline
|
||||||
border.width: 2
|
border.width: 2
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: thumb
|
id: thumb
|
||||||
width: 28
|
width: 28
|
||||||
|
|
@ -159,12 +180,12 @@ Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
y: 2
|
y: 2
|
||||||
x: Settings.settings.showActiveWindowIcon ? customSwitch.width - width - 2 : 2
|
x: Settings.settings.showActiveWindowIcon ? customSwitch.width - width - 2 : 2
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -178,9 +199,11 @@ Rectangle {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 8
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Show System Info In Bar"
|
text: "Show System Info In Bar"
|
||||||
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
|
|
@ -200,7 +223,7 @@ Rectangle {
|
||||||
color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.surfaceVariant
|
color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.surfaceVariant
|
||||||
border.color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.outline
|
border.color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.outline
|
||||||
border.width: 2
|
border.width: 2
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: thumb2
|
id: thumb2
|
||||||
width: 28
|
width: 28
|
||||||
|
|
@ -211,12 +234,12 @@ Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
y: 2
|
y: 2
|
||||||
x: Settings.settings.showSystemInfoInBar ? customSwitch2.width - width - 2 : 2
|
x: Settings.settings.showSystemInfoInBar ? customSwitch2.width - width - 2 : 2
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -230,9 +253,11 @@ Rectangle {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 8
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Show Media In Bar"
|
text: "Show Media In Bar"
|
||||||
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
|
|
@ -252,7 +277,7 @@ Rectangle {
|
||||||
color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.surfaceVariant
|
color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.surfaceVariant
|
||||||
border.color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.outline
|
border.color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.outline
|
||||||
border.width: 2
|
border.width: 2
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: thumb3
|
id: thumb3
|
||||||
width: 28
|
width: 28
|
||||||
|
|
@ -263,12 +288,12 @@ Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
y: 2
|
y: 2
|
||||||
x: Settings.settings.showMediaInBar ? customSwitch3.width - width - 2 : 2
|
x: Settings.settings.showMediaInBar ? customSwitch3.width - width - 2 : 2
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -279,103 +304,118 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visualizer Type Selection
|
// Visualizer Type Selection
|
||||||
RowLayout {
|
ColumnLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 16
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Visualizer Type"
|
text: "Visualizer Type"
|
||||||
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
ComboBox {
|
||||||
|
id: visualizerTypeComboBox
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
Layout.preferredHeight: 40
|
||||||
|
model: ["radial", "fire", "diamond"]
|
||||||
|
currentIndex: model.indexOf(Settings.settings.visualizerType)
|
||||||
|
|
||||||
// Dropdown for visualizer type
|
background: Rectangle {
|
||||||
Rectangle {
|
implicitWidth: 120
|
||||||
width: 120
|
implicitHeight: 40
|
||||||
height: 36
|
color: Theme.surfaceVariant
|
||||||
radius: 8
|
border.color: visualizerTypeComboBox.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||||
color: Theme.surfaceVariant
|
border.width: 1
|
||||||
border.color: Theme.outline
|
radius: 8
|
||||||
border.width: 1
|
}
|
||||||
|
|
||||||
Text {
|
contentItem: Text {
|
||||||
id: visualizerTypeText
|
leftPadding: 12
|
||||||
anchors.left: parent.left
|
rightPadding: visualizerTypeComboBox.indicator.width + visualizerTypeComboBox.spacing
|
||||||
anchors.leftMargin: 12
|
text: visualizerTypeComboBox.displayText.charAt(0).toUpperCase() + visualizerTypeComboBox.displayText.slice(1)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
font.family: Theme.fontFamily
|
||||||
text: Settings.settings.visualizerType === "fire" ? "Fire" :
|
|
||||||
Settings.settings.visualizerType === "diamond" ? "Diamond" :
|
|
||||||
Settings.settings.visualizerType === "radial" ? "Radial" : "Radial"
|
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
indicator: Text {
|
||||||
|
x: visualizerTypeComboBox.width - width - 12
|
||||||
|
y: visualizerTypeComboBox.topPadding + (visualizerTypeComboBox.availableHeight - height) / 2
|
||||||
text: "arrow_drop_down"
|
text: "arrow_drop_down"
|
||||||
font.family: "Material Symbols Outlined"
|
font.family: "Material Symbols Outlined"
|
||||||
font.pixelSize: 20
|
font.pixelSize: 24
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 8
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
popup: Popup {
|
||||||
anchors.fill: parent
|
y: visualizerTypeComboBox.height
|
||||||
onClicked: {
|
width: visualizerTypeComboBox.width
|
||||||
visualizerTypeMenu.open()
|
implicitHeight: contentItem.implicitHeight
|
||||||
|
padding: 1
|
||||||
|
|
||||||
|
contentItem: ListView {
|
||||||
|
clip: true
|
||||||
|
implicitHeight: contentHeight
|
||||||
|
model: visualizerTypeComboBox.popup.visible ? visualizerTypeComboBox.delegateModel : null
|
||||||
|
currentIndex: visualizerTypeComboBox.highlightedIndex
|
||||||
|
|
||||||
|
ScrollIndicator.vertical: ScrollIndicator {}
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: Theme.surfaceVariant
|
||||||
|
border.color: Theme.outline
|
||||||
|
border.width: 1
|
||||||
|
radius: 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
delegate: ItemDelegate {
|
||||||
id: visualizerTypeMenu
|
width: visualizerTypeComboBox.width
|
||||||
width: 120
|
contentItem: Text {
|
||||||
y: parent.height
|
text: modelData.charAt(0).toUpperCase() + modelData.slice(1)
|
||||||
|
font.family: Theme.fontFamily
|
||||||
|
font.pixelSize: 13
|
||||||
|
color: Theme.textPrimary
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
|
highlighted: visualizerTypeComboBox.highlightedIndex === index
|
||||||
|
|
||||||
MenuItem {
|
background: Rectangle {
|
||||||
text: "Fire"
|
color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent"
|
||||||
onTriggered: {
|
|
||||||
Settings.settings.visualizerType = "fire"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: "Diamond"
|
|
||||||
onTriggered: {
|
|
||||||
Settings.settings.visualizerType = "diamond"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
text: "Radial"
|
|
||||||
onTriggered: {
|
|
||||||
Settings.settings.visualizerType = "radial"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onActivated: {
|
||||||
|
Settings.settings.visualizerType = model[index];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video Path Input Row
|
// Video Path Input Section
|
||||||
RowLayout {
|
ColumnLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 8
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: "Video Path"
|
text: "Video Path"
|
||||||
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 36
|
Layout.preferredHeight: 40
|
||||||
radius: 8
|
radius: 8
|
||||||
color: Theme.surfaceVariant
|
color: Theme.surfaceVariant
|
||||||
border.color: videoPathInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
border.color: videoPathInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||||
|
|
@ -383,9 +423,16 @@ Rectangle {
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: videoPathInput
|
id: videoPathInput
|
||||||
anchors.fill: parent
|
anchors.left: parent.left
|
||||||
anchors.margins: 12
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.leftMargin: 12
|
||||||
|
anchors.rightMargin: 12
|
||||||
|
anchors.topMargin: 6
|
||||||
|
anchors.bottomMargin: 6
|
||||||
text: Settings.settings.videoPath !== undefined ? Settings.settings.videoPath : ""
|
text: Settings.settings.videoPath !== undefined ? Settings.settings.videoPath : ""
|
||||||
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
|
|
@ -404,4 +451,4 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ PanelWindow {
|
||||||
//z: 100
|
//z: 100
|
||||||
//border.color: Theme.outline
|
//border.color: Theme.outline
|
||||||
//border.width: 1
|
//border.width: 1
|
||||||
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -31,12 +31,17 @@ PanelWindow {
|
||||||
z: 0
|
z: 0
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: content
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 32
|
anchors.leftMargin: 32
|
||||||
|
anchors.rightMargin: 32
|
||||||
|
anchors.topMargin: 32
|
||||||
|
|
||||||
spacing: 24
|
spacing: 24
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: header
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 4
|
spacing: 4
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -99,7 +104,7 @@ PanelWindow {
|
||||||
// Scrollable settings area
|
// Scrollable settings area
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 520
|
Layout.preferredHeight: content.height - settingsTabs.height - header.height - 128
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.width: 0
|
border.width: 0
|
||||||
radius: 20
|
radius: 20
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import qs.Settings
|
import qs.Settings
|
||||||
|
|
@ -6,11 +6,10 @@ import qs.Settings
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: wallpaperSettingsCard
|
id: wallpaperSettingsCard
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 680
|
Layout.preferredHeight: 720
|
||||||
color: Theme.surface
|
color: Theme.surface
|
||||||
radius: 18
|
radius: 18
|
||||||
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 18
|
anchors.margins: 18
|
||||||
|
|
@ -27,7 +26,7 @@ Rectangle {
|
||||||
color: Theme.accentPrimary
|
color: Theme.accentPrimary
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: "Wallpaper Folder"
|
text: "Wallpaper Settings"
|
||||||
font.family: Theme.fontFamily
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
font.bold: true
|
font.bold: true
|
||||||
|
|
@ -36,39 +35,52 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Folder Path Input
|
ColumnLayout {
|
||||||
Rectangle {
|
spacing: 8
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 40
|
|
||||||
radius: 8
|
Text {
|
||||||
color: Theme.surfaceVariant
|
text: "Wallpaper Path"
|
||||||
border.color: folderInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
|
||||||
border.width: 1
|
|
||||||
TextInput {
|
|
||||||
id: folderInput
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.leftMargin: 12
|
|
||||||
anchors.rightMargin: 12
|
|
||||||
anchors.topMargin: 6
|
|
||||||
anchors.bottomMargin: 6
|
|
||||||
text: Settings.settings.wallpaperFolder
|
|
||||||
font.family: Theme.fontFamily
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
}
|
||||||
clip: true
|
|
||||||
selectByMouse: true
|
// Folder Path Input
|
||||||
activeFocusOnTab: true
|
Rectangle {
|
||||||
inputMethodHints: Qt.ImhUrlCharactersOnly
|
Layout.fillWidth: true
|
||||||
onTextChanged: {
|
Layout.preferredHeight: 40
|
||||||
Settings.settings.wallpaperFolder = text
|
radius: 8
|
||||||
}
|
color: Theme.surfaceVariant
|
||||||
MouseArea {
|
border.color: folderInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||||
anchors.fill: parent
|
border.width: 1
|
||||||
onClicked: folderInput.forceActiveFocus()
|
TextInput {
|
||||||
|
id: folderInput
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.leftMargin: 12
|
||||||
|
anchors.rightMargin: 12
|
||||||
|
anchors.topMargin: 6
|
||||||
|
anchors.bottomMargin: 6
|
||||||
|
text: Settings.settings.wallpaperFolder
|
||||||
|
font.family: Theme.fontFamily
|
||||||
|
font.pixelSize: 13
|
||||||
|
color: Theme.textPrimary
|
||||||
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
|
clip: true
|
||||||
|
selectByMouse: true
|
||||||
|
activeFocusOnTab: true
|
||||||
|
inputMethodHints: Qt.ImhUrlCharactersOnly
|
||||||
|
onTextChanged: {
|
||||||
|
Settings.settings.wallpaperFolder = text;
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: folderInput.forceActiveFocus()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +111,7 @@ Rectangle {
|
||||||
color: Settings.settings.useSWWW ? Theme.accentPrimary : Theme.surfaceVariant
|
color: Settings.settings.useSWWW ? Theme.accentPrimary : Theme.surfaceVariant
|
||||||
border.color: Settings.settings.useSWWW ? Theme.accentPrimary : Theme.outline
|
border.color: Settings.settings.useSWWW ? Theme.accentPrimary : Theme.outline
|
||||||
border.width: 2
|
border.width: 2
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: swwwThumb
|
id: swwwThumb
|
||||||
width: 28
|
width: 28
|
||||||
|
|
@ -110,16 +122,19 @@ Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
y: 2
|
y: 2
|
||||||
x: Settings.settings.useSWWW ? swwwSwitch.width - width - 2 : 2
|
x: Settings.settings.useSWWW ? swwwSwitch.width - width - 2 : 2
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
NumberAnimation {
|
||||||
|
duration: 200
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Settings.settings.useSWWW = !Settings.settings.useSWWW
|
Settings.settings.useSWWW = !Settings.settings.useSWWW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +166,7 @@ Rectangle {
|
||||||
color: Settings.settings.randomWallpaper ? Theme.accentPrimary : Theme.surfaceVariant
|
color: Settings.settings.randomWallpaper ? Theme.accentPrimary : Theme.surfaceVariant
|
||||||
border.color: Settings.settings.randomWallpaper ? Theme.accentPrimary : Theme.outline
|
border.color: Settings.settings.randomWallpaper ? Theme.accentPrimary : Theme.outline
|
||||||
border.width: 2
|
border.width: 2
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: randomWallpaperThumb
|
id: randomWallpaperThumb
|
||||||
width: 28
|
width: 28
|
||||||
|
|
@ -162,16 +177,19 @@ Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
y: 2
|
y: 2
|
||||||
x: Settings.settings.randomWallpaper ? randomWallpaperSwitch.width - width - 2 : 2
|
x: Settings.settings.randomWallpaper ? randomWallpaperSwitch.width - width - 2 : 2
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
NumberAnimation {
|
||||||
|
duration: 200
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Settings.settings.randomWallpaper = !Settings.settings.randomWallpaper
|
Settings.settings.randomWallpaper = !Settings.settings.randomWallpaper;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -203,7 +221,7 @@ Rectangle {
|
||||||
color: Settings.settings.useWallpaperTheme ? Theme.accentPrimary : Theme.surfaceVariant
|
color: Settings.settings.useWallpaperTheme ? Theme.accentPrimary : Theme.surfaceVariant
|
||||||
border.color: Settings.settings.useWallpaperTheme ? Theme.accentPrimary : Theme.outline
|
border.color: Settings.settings.useWallpaperTheme ? Theme.accentPrimary : Theme.outline
|
||||||
border.width: 2
|
border.width: 2
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: wallpaperThemeThumb
|
id: wallpaperThemeThumb
|
||||||
width: 28
|
width: 28
|
||||||
|
|
@ -214,16 +232,19 @@ Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
y: 2
|
y: 2
|
||||||
x: Settings.settings.useWallpaperTheme ? wallpaperThemeSwitch.width - width - 2 : 2
|
x: Settings.settings.useWallpaperTheme ? wallpaperThemeSwitch.width - width - 2 : 2
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.OutCubic }
|
NumberAnimation {
|
||||||
|
duration: 200
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Settings.settings.useWallpaperTheme = !Settings.settings.useWallpaperTheme
|
Settings.settings.useWallpaperTheme = !Settings.settings.useWallpaperTheme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -243,18 +264,18 @@ Rectangle {
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: Settings.settings.wallpaperInterval
|
text: Settings.settings.wallpaperInterval
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider {
|
Slider {
|
||||||
id: intervalSlider
|
id: intervalSlider
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -263,7 +284,7 @@ Rectangle {
|
||||||
stepSize: 10
|
stepSize: 10
|
||||||
value: Settings.settings.wallpaperInterval
|
value: Settings.settings.wallpaperInterval
|
||||||
snapMode: Slider.SnapAlways
|
snapMode: Slider.SnapAlways
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
x: intervalSlider.leftPadding
|
x: intervalSlider.leftPadding
|
||||||
y: intervalSlider.topPadding + intervalSlider.availableHeight / 2 - height / 2
|
y: intervalSlider.topPadding + intervalSlider.availableHeight / 2 - height / 2
|
||||||
|
|
@ -273,7 +294,7 @@ Rectangle {
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
radius: 2
|
radius: 2
|
||||||
color: Theme.surfaceVariant
|
color: Theme.surfaceVariant
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: intervalSlider.visualPosition * parent.width
|
width: intervalSlider.visualPosition * parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
@ -281,7 +302,7 @@ Rectangle {
|
||||||
radius: 2
|
radius: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
x: intervalSlider.leftPadding + intervalSlider.visualPosition * (intervalSlider.availableWidth - width)
|
x: intervalSlider.leftPadding + intervalSlider.visualPosition * (intervalSlider.availableWidth - width)
|
||||||
y: intervalSlider.topPadding + intervalSlider.availableHeight / 2 - height / 2
|
y: intervalSlider.topPadding + intervalSlider.availableHeight / 2 - height / 2
|
||||||
|
|
@ -294,11 +315,11 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMoved: {
|
onMoved: {
|
||||||
Settings.settings.wallpaperInterval = Math.round(value)
|
Settings.settings.wallpaperInterval = Math.round(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resize Mode Setting
|
// Resize Mode Setting
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
@ -311,14 +332,14 @@ Rectangle {
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: resizeComboBox
|
id: resizeComboBox
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 40
|
Layout.preferredHeight: 40
|
||||||
model: ["no", "crop", "fit", "stretch"]
|
model: ["no", "crop", "fit", "stretch"]
|
||||||
currentIndex: model.indexOf(Settings.settings.wallpaperResize)
|
currentIndex: model.indexOf(Settings.settings.wallpaperResize)
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: 120
|
implicitWidth: 120
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
|
|
@ -327,7 +348,7 @@ Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
radius: 8
|
radius: 8
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
leftPadding: 12
|
leftPadding: 12
|
||||||
rightPadding: resizeComboBox.indicator.width + resizeComboBox.spacing
|
rightPadding: resizeComboBox.indicator.width + resizeComboBox.spacing
|
||||||
|
|
@ -338,7 +359,7 @@ Rectangle {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
indicator: Text {
|
indicator: Text {
|
||||||
x: resizeComboBox.width - width - 12
|
x: resizeComboBox.width - width - 12
|
||||||
y: resizeComboBox.topPadding + (resizeComboBox.availableHeight - height) / 2
|
y: resizeComboBox.topPadding + (resizeComboBox.availableHeight - height) / 2
|
||||||
|
|
@ -347,22 +368,22 @@ Rectangle {
|
||||||
font.pixelSize: 24
|
font.pixelSize: 24
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
popup: Popup {
|
popup: Popup {
|
||||||
y: resizeComboBox.height
|
y: resizeComboBox.height
|
||||||
width: resizeComboBox.width
|
width: resizeComboBox.width
|
||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
padding: 1
|
padding: 1
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
clip: true
|
clip: true
|
||||||
implicitHeight: contentHeight
|
implicitHeight: contentHeight
|
||||||
model: resizeComboBox.popup.visible ? resizeComboBox.delegateModel : null
|
model: resizeComboBox.popup.visible ? resizeComboBox.delegateModel : null
|
||||||
currentIndex: resizeComboBox.highlightedIndex
|
currentIndex: resizeComboBox.highlightedIndex
|
||||||
|
|
||||||
ScrollIndicator.vertical: ScrollIndicator { }
|
ScrollIndicator.vertical: ScrollIndicator {}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: Theme.surfaceVariant
|
color: Theme.surfaceVariant
|
||||||
border.color: Theme.outline
|
border.color: Theme.outline
|
||||||
|
|
@ -370,7 +391,7 @@ Rectangle {
|
||||||
radius: 8
|
radius: 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: ItemDelegate {
|
||||||
width: resizeComboBox.width
|
width: resizeComboBox.width
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
|
@ -382,18 +403,18 @@ Rectangle {
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
highlighted: resizeComboBox.highlightedIndex === index
|
highlighted: resizeComboBox.highlightedIndex === index
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent"
|
color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
Settings.settings.wallpaperResize = model[index]
|
Settings.settings.wallpaperResize = model[index];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transition Type Setting
|
// Transition Type Setting
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
@ -406,14 +427,14 @@ Rectangle {
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: transitionTypeComboBox
|
id: transitionTypeComboBox
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 40
|
Layout.preferredHeight: 40
|
||||||
model: ["none", "simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer", "random"]
|
model: ["none", "simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer", "random"]
|
||||||
currentIndex: model.indexOf(Settings.settings.transitionType)
|
currentIndex: model.indexOf(Settings.settings.transitionType)
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: 120
|
implicitWidth: 120
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
|
|
@ -422,7 +443,7 @@ Rectangle {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
radius: 8
|
radius: 8
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
leftPadding: 12
|
leftPadding: 12
|
||||||
rightPadding: transitionTypeComboBox.indicator.width + transitionTypeComboBox.spacing
|
rightPadding: transitionTypeComboBox.indicator.width + transitionTypeComboBox.spacing
|
||||||
|
|
@ -433,7 +454,7 @@ Rectangle {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
indicator: Text {
|
indicator: Text {
|
||||||
x: transitionTypeComboBox.width - width - 12
|
x: transitionTypeComboBox.width - width - 12
|
||||||
y: transitionTypeComboBox.topPadding + (transitionTypeComboBox.availableHeight - height) / 2
|
y: transitionTypeComboBox.topPadding + (transitionTypeComboBox.availableHeight - height) / 2
|
||||||
|
|
@ -442,22 +463,22 @@ Rectangle {
|
||||||
font.pixelSize: 24
|
font.pixelSize: 24
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
popup: Popup {
|
popup: Popup {
|
||||||
y: transitionTypeComboBox.height
|
y: transitionTypeComboBox.height
|
||||||
width: transitionTypeComboBox.width
|
width: transitionTypeComboBox.width
|
||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
padding: 1
|
padding: 1
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
clip: true
|
clip: true
|
||||||
implicitHeight: contentHeight
|
implicitHeight: contentHeight
|
||||||
model: transitionTypeComboBox.popup.visible ? transitionTypeComboBox.delegateModel : null
|
model: transitionTypeComboBox.popup.visible ? transitionTypeComboBox.delegateModel : null
|
||||||
currentIndex: transitionTypeComboBox.highlightedIndex
|
currentIndex: transitionTypeComboBox.highlightedIndex
|
||||||
|
|
||||||
ScrollIndicator.vertical: ScrollIndicator { }
|
ScrollIndicator.vertical: ScrollIndicator {}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: Theme.surfaceVariant
|
color: Theme.surfaceVariant
|
||||||
border.color: Theme.outline
|
border.color: Theme.outline
|
||||||
|
|
@ -465,7 +486,7 @@ Rectangle {
|
||||||
radius: 8
|
radius: 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: ItemDelegate {
|
||||||
width: transitionTypeComboBox.width
|
width: transitionTypeComboBox.width
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
|
@ -477,18 +498,18 @@ Rectangle {
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
highlighted: transitionTypeComboBox.highlightedIndex === index
|
highlighted: transitionTypeComboBox.highlightedIndex === index
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent"
|
color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
Settings.settings.transitionType = model[index]
|
Settings.settings.transitionType = model[index];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transition FPS Setting
|
// Transition FPS Setting
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
@ -503,18 +524,18 @@ Rectangle {
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: Settings.settings.transitionFps
|
text: Settings.settings.transitionFps
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider {
|
Slider {
|
||||||
id: fpsSlider
|
id: fpsSlider
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -523,7 +544,7 @@ Rectangle {
|
||||||
stepSize: 5
|
stepSize: 5
|
||||||
value: Settings.settings.transitionFps
|
value: Settings.settings.transitionFps
|
||||||
snapMode: Slider.SnapAlways
|
snapMode: Slider.SnapAlways
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
x: fpsSlider.leftPadding
|
x: fpsSlider.leftPadding
|
||||||
y: fpsSlider.topPadding + fpsSlider.availableHeight / 2 - height / 2
|
y: fpsSlider.topPadding + fpsSlider.availableHeight / 2 - height / 2
|
||||||
|
|
@ -533,7 +554,7 @@ Rectangle {
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
radius: 2
|
radius: 2
|
||||||
color: Theme.surfaceVariant
|
color: Theme.surfaceVariant
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: fpsSlider.visualPosition * parent.width
|
width: fpsSlider.visualPosition * parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
@ -541,7 +562,7 @@ Rectangle {
|
||||||
radius: 2
|
radius: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
x: fpsSlider.leftPadding + fpsSlider.visualPosition * (fpsSlider.availableWidth - width)
|
x: fpsSlider.leftPadding + fpsSlider.visualPosition * (fpsSlider.availableWidth - width)
|
||||||
y: fpsSlider.topPadding + fpsSlider.availableHeight / 2 - height / 2
|
y: fpsSlider.topPadding + fpsSlider.availableHeight / 2 - height / 2
|
||||||
|
|
@ -554,11 +575,11 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMoved: {
|
onMoved: {
|
||||||
Settings.settings.transitionFps = Math.round(value)
|
Settings.settings.transitionFps = Math.round(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transition Duration Setting
|
// Transition Duration Setting
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
@ -573,18 +594,18 @@ Rectangle {
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: Settings.settings.transitionDuration.toFixed(3)
|
text: Settings.settings.transitionDuration.toFixed(3)
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
color: Theme.textPrimary
|
color: Theme.textPrimary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider {
|
Slider {
|
||||||
id: durationSlider
|
id: durationSlider
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -593,7 +614,7 @@ Rectangle {
|
||||||
stepSize: 0.050
|
stepSize: 0.050
|
||||||
value: Settings.settings.transitionDuration
|
value: Settings.settings.transitionDuration
|
||||||
snapMode: Slider.SnapAlways
|
snapMode: Slider.SnapAlways
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
x: durationSlider.leftPadding
|
x: durationSlider.leftPadding
|
||||||
y: durationSlider.topPadding + durationSlider.availableHeight / 2 - height / 2
|
y: durationSlider.topPadding + durationSlider.availableHeight / 2 - height / 2
|
||||||
|
|
@ -603,7 +624,7 @@ Rectangle {
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
radius: 2
|
radius: 2
|
||||||
color: Theme.surfaceVariant
|
color: Theme.surfaceVariant
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: durationSlider.visualPosition * parent.width
|
width: durationSlider.visualPosition * parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
@ -611,7 +632,7 @@ Rectangle {
|
||||||
radius: 2
|
radius: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
x: durationSlider.leftPadding + durationSlider.visualPosition * (durationSlider.availableWidth - width)
|
x: durationSlider.leftPadding + durationSlider.visualPosition * (durationSlider.availableWidth - width)
|
||||||
y: durationSlider.topPadding + durationSlider.availableHeight / 2 - height / 2
|
y: durationSlider.topPadding + durationSlider.availableHeight / 2 - height / 2
|
||||||
|
|
@ -624,9 +645,9 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMoved: {
|
onMoved: {
|
||||||
Settings.settings.transitionDuration = value
|
Settings.settings.transitionDuration = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ Item {
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
margins.right: 0
|
margins.right: 0
|
||||||
margins.top: 0
|
margins.top: 0
|
||||||
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (!visible && Bluetooth.defaultAdapter && Bluetooth.defaultAdapter.discovering)
|
if (!visible && Bluetooth.defaultAdapter && Bluetooth.defaultAdapter.discovering)
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ Item {
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
margins.right: 0
|
margins.right: 0
|
||||||
margins.top: 0
|
margins.top: 0
|
||||||
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
wifiLogic.refreshNetworks()
|
wifiLogic.refreshNetworks()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue