fix: misc music fixes + add visualizer options
This commit is contained in:
parent
c169e7702a
commit
ab29e3a084
7 changed files with 129 additions and 19 deletions
|
|
@ -7,7 +7,7 @@ import qs.Settings
|
|||
Rectangle {
|
||||
id: profileSettingsCard
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 300
|
||||
Layout.preferredHeight: 340
|
||||
color: Theme.surface
|
||||
radius: 18
|
||||
border.color: "transparent"
|
||||
|
|
@ -19,6 +19,8 @@ Rectangle {
|
|||
signal showSystemInfoChanged(bool showSystemInfoInBar)
|
||||
property bool showMediaInBar: false
|
||||
signal showMediaChanged(bool showMediaInBar)
|
||||
property string visualizerType: Settings.visualizerType
|
||||
signal visualizerTypeUpdated(string type)
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
|
@ -284,6 +286,88 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
// Visualizer Type Selection
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
|
||||
Text {
|
||||
text: "Visualizer Type"
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
color: Theme.textPrimary
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
// Dropdown for visualizer type
|
||||
Rectangle {
|
||||
width: 120
|
||||
height: 36
|
||||
radius: 8
|
||||
color: Theme.surfaceVariant
|
||||
border.color: Theme.outline
|
||||
border.width: 1
|
||||
|
||||
Text {
|
||||
id: visualizerTypeText
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: visualizerType === "fire" ? "Fire" :
|
||||
visualizerType === "diamond" ? "Diamond" :
|
||||
visualizerType === "radial" ? "Radial" : "Radial"
|
||||
font.pixelSize: 13
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "arrow_drop_down"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 20
|
||||
color: Theme.textPrimary
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
visualizerTypeMenu.open()
|
||||
}
|
||||
}
|
||||
|
||||
Menu {
|
||||
id: visualizerTypeMenu
|
||||
width: 120
|
||||
y: parent.height
|
||||
|
||||
MenuItem {
|
||||
text: "Fire"
|
||||
onTriggered: {
|
||||
visualizerTypeUpdated("fire")
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: "Diamond"
|
||||
onTriggered: {
|
||||
visualizerTypeUpdated("diamond")
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: "Radial"
|
||||
onTriggered: {
|
||||
visualizerTypeUpdated("radial")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Video Path Input Row
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ PanelWindow {
|
|||
property real tempTransitionDuration: Settings.transitionDuration
|
||||
property bool tempShowSystemInfoInBar: Settings.showSystemInfoInBar
|
||||
property bool tempShowMediaInBar: Settings.showMediaInBar
|
||||
property string tempVisualizerType: Settings.visualizerType
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
|
@ -151,6 +152,10 @@ PanelWindow {
|
|||
onShowMediaChanged: function (showMediaInBar) {
|
||||
tempShowMediaInBar = showMediaInBar;
|
||||
}
|
||||
visualizerType: tempVisualizerType
|
||||
onVisualizerTypeUpdated: function (type) {
|
||||
tempVisualizerType = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
CollapsibleCategory {
|
||||
|
|
@ -236,6 +241,7 @@ PanelWindow {
|
|||
Settings.transitionDuration = tempTransitionDuration;
|
||||
Settings.showSystemInfoInBar = tempShowSystemInfoInBar;
|
||||
Settings.showMediaInBar = tempShowMediaInBar;
|
||||
Settings.visualizerType = tempVisualizerType;
|
||||
Settings.saveSettings();
|
||||
if (typeof weather !== 'undefined' && weather) {
|
||||
weather.fetchCityWeather();
|
||||
|
|
@ -266,6 +272,9 @@ PanelWindow {
|
|||
tempTransitionFps = Settings.transitionFps;
|
||||
tempTransitionType = Settings.transitionType;
|
||||
tempTransitionDuration = Settings.transitionDuration;
|
||||
tempShowSystemInfoInBar = Settings.showSystemInfoInBar;
|
||||
tempShowMediaInBar = Settings.showMediaInBar;
|
||||
tempVisualizerType = Settings.visualizerType;
|
||||
|
||||
visible = true;
|
||||
// Force focus on the text input after a short delay
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
anchors.margins: 18
|
||||
spacing: 12
|
||||
visible: currentPlayer
|
||||
visible: !!MusicManager.currentPlayer
|
||||
|
||||
// Album art and spectrum
|
||||
RowLayout {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue