diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 9875a4f..b884196 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -11,8 +11,8 @@ Row { id: root anchors.verticalCenter: parent.verticalCenter spacing: Style.marginS * scaling - visible: MediaService.currentPlayer !== null - width: MediaService.currentPlayer !== null ? implicitWidth : 0 + visible: MediaService.currentPlayer !== null && MediaService.canPlay + width: MediaService.currentPlayer !== null && MediaService.canPlay ? implicitWidth : 0 function getTitle() { return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "") diff --git a/Modules/Bar/Widgets/PowerProfile.qml b/Modules/Bar/Widgets/PowerProfile.qml index 6a9b978..7d3afa9 100644 --- a/Modules/Bar/Widgets/PowerProfile.qml +++ b/Modules/Bar/Widgets/PowerProfile.qml @@ -11,7 +11,7 @@ NIconButton { property var powerProfiles: PowerProfiles readonly property bool hasPP: powerProfiles.hasPerformanceProfile - + sizeMultiplier: 0.8 visible: hasPP @@ -25,26 +25,27 @@ NIconButton { if (powerProfiles.profile === PowerProfile.PowerSaver) return "eco" } - + function profileName() { - if (!hasPP) - return "Unknown" - if (powerProfiles.profile === PowerProfile.Performance) - return "Performance" - if (powerProfiles.profile === PowerProfile.Balanced) - return "Balanced" - if (powerProfiles.profile === PowerProfile.PowerSaver) - return "Power Saver" + if (!hasPP) + return "Unknown" + if (powerProfiles.profile === PowerProfile.Performance) + return "Performance" + if (powerProfiles.profile === PowerProfile.Balanced) + return "Balanced" + if (powerProfiles.profile === PowerProfile.PowerSaver) + return "Power Saver" } - + function changeProfile() { - if (!hasPP) return; - if (powerProfiles.profile === PowerProfile.Performance) - powerProfiles.profile = PowerProfile.PowerSaver - else if (powerProfiles.profile === PowerProfile.Balanced) - powerProfiles.profile = PowerProfile.Performance - else if (powerProfiles.profile === PowerProfile.PowerSaver) - powerProfiles.profile = PowerProfile.Balanced + if (!hasPP) + return + if (powerProfiles.profile === PowerProfile.Performance) + powerProfiles.profile = PowerProfile.PowerSaver + else if (powerProfiles.profile === PowerProfile.Balanced) + powerProfiles.profile = PowerProfile.Performance + else if (powerProfiles.profile === PowerProfile.PowerSaver) + powerProfiles.profile = PowerProfile.Balanced } icon: root.profileIcon() diff --git a/Modules/SettingsPanel/Tabs/AudioTab.qml b/Modules/SettingsPanel/Tabs/AudioTab.qml index 2f64aca..065350f 100644 --- a/Modules/SettingsPanel/Tabs/AudioTab.qml +++ b/Modules/SettingsPanel/Tabs/AudioTab.qml @@ -308,7 +308,7 @@ ColumnLayout { Settings.data.audio.visualizerType = key } } - + NComboBox { label: "Frame Rate" description: "Target frame rate for audio visualizer. (default: 60)" @@ -344,8 +344,8 @@ ColumnLayout { } currentKey: Settings.data.audio.cavaFrameRate onSelected: key => { - Settings.data.audio.cavaFrameRate = key - } + Settings.data.audio.cavaFrameRate = key + } } } } diff --git a/Modules/SettingsPanel/Tabs/BarTab.qml b/Modules/SettingsPanel/Tabs/BarTab.qml index 9e4bf9d..f6def60 100644 --- a/Modules/SettingsPanel/Tabs/BarTab.qml +++ b/Modules/SettingsPanel/Tabs/BarTab.qml @@ -33,7 +33,6 @@ ColumnLayout { spacing: Style.marginL * scaling Layout.fillWidth: true - ColumnLayout { spacing: Style.marginXXS * scaling Layout.fillWidth: true @@ -72,7 +71,7 @@ ColumnLayout { } } - ColumnLayout { + ColumnLayout { spacing: Style.marginXXS * scaling Layout.fillWidth: true @@ -111,7 +110,6 @@ ColumnLayout { } } - NToggle { label: "Show Active Window's Icon" description: "Display the app icon next to the title of the currently focused window." @@ -130,7 +128,6 @@ ColumnLayout { } } - NDivider { Layout.fillWidth: true Layout.topMargin: Style.marginL * scaling diff --git a/Modules/SidePanel/Cards/MediaCard.qml b/Modules/SidePanel/Cards/MediaCard.qml index aad0839..fae3f38 100644 --- a/Modules/SidePanel/Cards/MediaCard.qml +++ b/Modules/SidePanel/Cards/MediaCard.qml @@ -160,8 +160,6 @@ NBox { height: 90 * scaling radius: width * 0.5 color: trackArt.visible ? Color.mPrimary : Color.transparent - border.color: trackArt.visible ? Color.mOutline : Color.transparent - border.width: Math.max(1, Style.borderS * scaling) clip: true NImageCircled { diff --git a/Widgets/NComboBox.qml b/Widgets/NComboBox.qml index 1cb33bb..0a1c79b 100644 --- a/Widgets/NComboBox.qml +++ b/Widgets/NComboBox.qml @@ -15,7 +15,7 @@ ColumnLayout { property ListModel model: { } - property string currentKey: '' + property string currentKey: "" property string placeholder: "" signal selected(string key) diff --git a/Widgets/NWidgetCard.qml b/Widgets/NWidgetCard.qml index 2808465..ccde0f2 100644 --- a/Widgets/NWidgetCard.qml +++ b/Widgets/NWidgetCard.qml @@ -58,23 +58,24 @@ NCard { description: "" placeholder: "Add widget to " + sectionName.toLowerCase() + " section" onSelected: key => { - comboBox.selectedKey = key + comboBox.currentKey = key } + Layout.alignment: Qt.AlignVCenter } NIconButton { icon: "add" - size: 24 * scaling + colorBg: Color.mPrimary colorFg: Color.mOnPrimary - colorBgHover: Color.mPrimaryContainer - colorFgHover: Color.mOnPrimaryContainer + colorBgHover: Color.mSecondary + colorFgHover: Color.mOnSecondary enabled: comboBox.selectedKey !== "" Layout.alignment: Qt.AlignVCenter onClicked: { - if (comboBox.selectedKey !== "") { - addWidget(comboBox.selectedKey, sectionName.toLowerCase()) - comboBox.reset() + if (comboBox.currentKey !== "") { + addWidget(comboBox.currentKey, sectionName.toLowerCase()) + comboBox.currentKey = "" } } }