diff --git a/Modules/MainScreen/SmartPanel.qml b/Modules/MainScreen/SmartPanel.qml index b2be2539..e4bda7a2 100644 --- a/Modules/MainScreen/SmartPanel.qml +++ b/Modules/MainScreen/SmartPanel.qml @@ -106,6 +106,16 @@ Item { signal opened signal closed + Connections { + target: Style + + function onUiScaleRatioChanged() { + if (root.isPanelOpen && root.isPanelVisible) { + root.setPosition() + } + } + } + // Panel visibility and sizing visible: isPanelVisible width: parent ? parent.width : 0 diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index 69ce1a65..a0dc4849 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -86,8 +86,8 @@ Variants { // Margins for PanelWindow (not anchors.topMargin!) margins.top: isTop ? Style.marginM + barOffset : 0 margins.bottom: isBottom ? Style.marginM + barOffset : 0 - margins.left: isLeft ? -Style.marginXL * 1.65 + barOffset : 0 - margins.right: isRight ? -Style.marginXL * 1.65 + barOffset : 0 + margins.left: isLeft ? Style.marginM + barOffset : 0 + margins.right: isRight ? Style.marginM + barOffset : 0 implicitWidth: notifWidth implicitHeight: notificationStack.implicitHeight + Style.marginL diff --git a/Modules/OSD/OSD.qml b/Modules/OSD/OSD.qml index 64549d45..835965e6 100644 --- a/Modules/OSD/OSD.qml +++ b/Modules/OSD/OSD.qml @@ -73,17 +73,29 @@ Variants { return 0 } + // Get maximum value for current OSD type + function getMaxValue() { + if (currentOSDType === "volume" || currentOSDType === "inputVolume") { + return Settings.data.audio.volumeOverdrive ? 1.5 : 1.0 + } else if (currentOSDType === "brightness") { + return 1.0 + } + return 1.0 + } + // Get display percentage function getDisplayPercentage() { if (currentOSDType === "volume") { if (isMuted) return "0%" - const pct = Math.round(Math.min(1.0, currentVolume) * 100) + const max = getMaxValue() + const pct = Math.round(Math.min(max, currentVolume) * 100) return pct + "%" } else if (currentOSDType === "inputVolume") { if (isInputMuted) return "0%" - const pct = Math.round(Math.min(1.0, currentInputVolume) * 100) + const max = getMaxValue() + const pct = Math.round(Math.min(max, currentInputVolume) * 100) return pct + "%" } else if (currentOSDType === "brightness") { const pct = Math.round(Math.min(1.0, currentBrightness) * 100) @@ -304,7 +316,7 @@ Variants { anchors.left: parent.left anchors.top: parent.top anchors.bottom: parent.bottom - width: parent.width * Math.min(1.0, root.getCurrentValue()) + width: parent.width * Math.min(1.0, root.getCurrentValue() / root.getMaxValue()) radius: parent.radius color: root.getProgressColor() @@ -333,8 +345,6 @@ Variants { horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter Layout.preferredWidth: Math.round(50 * Style.uiScaleRatio) - anchors.verticalCenter: parent.verticalCenter - anchors.verticalCenterOffset: 0 } } } @@ -393,7 +403,7 @@ Variants { anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom - height: parent.height * Math.min(1.0, root.getCurrentValue()) + height: parent.height * Math.min(1.0, root.getCurrentValue() / root.getMaxValue()) radius: parent.radius color: root.getProgressColor() diff --git a/Modules/Panels/ControlCenter/ControlCenterPanel.qml b/Modules/Panels/ControlCenter/ControlCenterPanel.qml index 8675b2a2..510d781f 100644 --- a/Modules/Panels/ControlCenter/ControlCenterPanel.qml +++ b/Modules/Panels/ControlCenter/ControlCenterPanel.qml @@ -30,7 +30,7 @@ SmartPanel { panelAnchorBottom: !shouldCenter && controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.startsWith("bottom_") panelAnchorTop: !shouldCenter && controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.startsWith("top_") - preferredWidth: Math.round(440 * Style.uiScaleRatio) + preferredWidth: Math.round(460 * Style.uiScaleRatio) preferredHeight: { var height = 0 var count = 0 diff --git a/Modules/Panels/Settings/Tabs/AboutTab.qml b/Modules/Panels/Settings/Tabs/AboutTab.qml index 919525f8..3bd64a45 100644 --- a/Modules/Panels/Settings/Tabs/AboutTab.qml +++ b/Modules/Panels/Settings/Tabs/AboutTab.qml @@ -179,8 +179,8 @@ ColumnLayout { } RowLayout { - anchors.fill: parent - anchors.margins: Style.marginS + anchors.centerIn: parent + width: parent.width - (Style.marginS * 2) spacing: Style.marginM Item { diff --git a/Modules/Panels/Settings/Tabs/WallpaperTab.qml b/Modules/Panels/Settings/Tabs/WallpaperTab.qml index 018ac7d7..6fb57733 100644 --- a/Modules/Panels/Settings/Tabs/WallpaperTab.qml +++ b/Modules/Panels/Settings/Tabs/WallpaperTab.qml @@ -85,6 +85,7 @@ ColumnLayout { border.color: Color.mOutline border.width: Style.borderS implicitHeight: contentCol.implicitHeight + Style.marginL * 2 + clip: true ColumnLayout { id: contentCol diff --git a/Modules/Panels/Wallpaper/WallpaperPanel.qml b/Modules/Panels/Wallpaper/WallpaperPanel.qml index 3cca50d9..60e2cd41 100644 --- a/Modules/Panels/Wallpaper/WallpaperPanel.qml +++ b/Modules/Panels/Wallpaper/WallpaperPanel.qml @@ -349,7 +349,7 @@ SmartPanel { return } wallpapersList = WallpaperService.getWallpapersList(targetScreen.name) - Logger.i("WallpaperPanel", "Got", wallpapersList.length, "wallpapers for screen", targetScreen.name) + Logger.d("WallpaperPanel", "Got", wallpapersList.length, "wallpapers for screen", targetScreen.name) // Pre-compute basenames once for better performance wallpapersWithNames = wallpapersList.map(function (p) { @@ -426,6 +426,50 @@ SmartPanel { ScrollBar.vertical: ScrollBar { policy: ScrollBar.AsNeeded + parent: wallpaperGridView + x: wallpaperGridView.mirrored ? 0 : wallpaperGridView.width - width + y: 0 + height: wallpaperGridView.height + + property color handleColor: Qt.alpha(Color.mHover, 0.8) + property color handleHoverColor: handleColor + property color handlePressedColor: handleColor + property real handleWidth: 6 + property real handleRadius: Style.radiusM + + contentItem: Rectangle { + implicitWidth: parent.handleWidth + implicitHeight: 100 + radius: parent.handleRadius + color: parent.pressed ? parent.handlePressedColor : parent.hovered ? parent.handleHoverColor : parent.handleColor + opacity: parent.policy === ScrollBar.AlwaysOn || parent.active ? 1.0 : 0.0 + + Behavior on opacity { + NumberAnimation { + duration: Style.animationFast + } + } + + Behavior on color { + ColorAnimation { + duration: Style.animationFast + } + } + } + + background: Rectangle { + implicitWidth: parent.handleWidth + implicitHeight: 100 + color: Color.transparent + opacity: parent.policy === ScrollBar.AlwaysOn || parent.active ? 0.3 : 0.0 + radius: parent.handleRadius / 2 + + Behavior on opacity { + NumberAnimation { + duration: Style.animationFast + } + } + } } delegate: ColumnLayout { diff --git a/Services/IPCService.qml b/Services/IPCService.qml index e7175219..6788b02c 100644 --- a/Services/IPCService.qml +++ b/Services/IPCService.qml @@ -35,6 +35,16 @@ Item { } } + IpcHandler { + target: "calendar" + function toggle() { + root.withTargetScreen(screen => { + var calendarPanel = PanelService.getPanel("calendarPanel", screen) + calendarPanel.toggle(null, "Clock") + }) + } + } + IpcHandler { target: "notifications" function toggleHistory() {