diff --git a/Widgets/SidePanel/PanelPopup.qml b/Widgets/SidePanel/PanelPopup.qml index 60867d9..d62d31b 100644 --- a/Widgets/SidePanel/PanelPopup.qml +++ b/Widgets/SidePanel/PanelPopup.qml @@ -79,10 +79,6 @@ PanelWithOverlay { if (systemWidget) systemWidget.panelVisible = true; - - if (quickAccessWidget) - quickAccessWidget.panelVisible = true; - } } @@ -116,7 +112,6 @@ PanelWithOverlay { var command = "gpu-screen-recorder -w portal" + " -f " + Settings.settings.recordingFrameRate + " -a default_output" + " -k " + Settings.settings.recordingCodec + " -ac " + Settings.settings.audioCodec + " -q " + Settings.settings.recordingQuality + " -cursor " + (Settings.settings.showCursor ? "yes" : "no") + " -cr " + Settings.settings.colorRange + " -o " + outputPath; Quickshell.execDetached(["sh", "-c", command]); isRecording = true; - quickAccessWidget.isRecording = true; } // Stop recording using Quickshell.execDetached @@ -129,7 +124,6 @@ PanelWithOverlay { cleanupTimer.destroy(); }); isRecording = false; - quickAccessWidget.isRecording = false; } implicitWidth: 500 * Theme.uiScale @@ -165,10 +159,6 @@ PanelWithOverlay { if (systemWidget) systemWidget.panelVisible = false; - - if (quickAccessWidget) - quickAccessWidget.panelVisible = false; - } sidebarPopupRect.isAnimating = false; } diff --git a/Widgets/SidePanel/QuickAccess.qml b/Widgets/SidePanel/QuickAccess.qml deleted file mode 100644 index 60b9a57..0000000 --- a/Widgets/SidePanel/QuickAccess.qml +++ /dev/null @@ -1,200 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import QtQuick.Effects -import Quickshell -import Quickshell.Io -import qs.Settings - -Rectangle { - id: quickAccessWidget - width: 440 - height: 80 - color: "transparent" - anchors.horizontalCenterOffset: -2 - - required property bool isRecording - - signal recordingRequested() - signal stopRecordingRequested() - signal recordingStateMismatch(bool actualState) - signal settingsRequested() - signal wallpaperRequested() - signal wallpaperSelectorRequested() - - Rectangle { - id: card - anchors.fill: parent - color: Theme.surface - radius: 18 - - RowLayout { - anchors.fill: parent - anchors.margins: 18 - spacing: 12 - - - Rectangle { - id: settingsButton - Layout.fillWidth: true - Layout.preferredHeight: 44 - radius: 12 - color: settingsButtonArea.containsMouse ? Theme.accentPrimary : "transparent" - border.color: Theme.accentPrimary - border.width: 1 - - RowLayout { - anchors.fill: parent - anchors.margins: 12 - spacing: 8 - - Text { - text: "settings" - font.family: settingsButtonArea.containsMouse ? "Material Symbols Rounded" : "Material Symbols Outlined" - font.pixelSize: 16 - color: settingsButtonArea.containsMouse ? Theme.onAccent : Theme.accentPrimary - } - - Text { - text: "Settings" - font.family: Theme.fontFamily - font.pixelSize: 14 - font.bold: true - color: settingsButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary - Layout.fillWidth: true - } - } - - MouseArea { - id: settingsButtonArea - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - hoverEnabled: true - onClicked: { - settingsRequested() - } - } - } - - - Rectangle { - id: recorderButton - Layout.fillWidth: true - Layout.preferredHeight: 44 - radius: 12 - color: isRecording ? Theme.accentPrimary : - (recorderButtonArea.containsMouse ? Theme.accentPrimary : "transparent") - border.color: Theme.accentPrimary - border.width: 1 - - RowLayout { - anchors.fill: parent - anchors.margins: 12 - spacing: 8 - - Text { - text: isRecording ? "radio_button_checked" : "radio_button_unchecked" - font.family: (isRecording || recorderButtonArea.containsMouse) ? "Material Symbols Rounded" : "Material Symbols Outlined" - font.pixelSize: 16 - color: isRecording || recorderButtonArea.containsMouse ? Theme.onAccent : Theme.accentPrimary - } - - Text { - text: isRecording ? "End" : "Record" - font.family: Theme.fontFamily - font.pixelSize: 14 - font.bold: true - color: isRecording || recorderButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary - Layout.fillWidth: true - } - } - - MouseArea { - id: recorderButtonArea - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - hoverEnabled: true - onClicked: { - if (isRecording) { - stopRecordingRequested() - } else { - recordingRequested() - } - } - } - } - - - Rectangle { - id: wallpaperButton - Layout.fillWidth: true - Layout.preferredHeight: 44 - radius: 12 - color: wallpaperButtonArea.containsMouse ? Theme.accentPrimary : "transparent" - border.color: Theme.accentPrimary - border.width: 1 - - RowLayout { - anchors.fill: parent - anchors.margins: 12 - spacing: 8 - - Text { - text: "image" - font.family: "Material Symbols Outlined" - font.pixelSize: 16 - color: wallpaperButtonArea.containsMouse ? Theme.onAccent : Theme.accentPrimary - } - - Text { - text: "Wallpaper" - font.family: Theme.fontFamily - font.pixelSize: 14 - font.bold: true - color: wallpaperButtonArea.containsMouse ? Theme.onAccent : Theme.textPrimary - Layout.fillWidth: true - } - } - - MouseArea { - id: wallpaperButtonArea - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - hoverEnabled: true - onClicked: { - wallpaperSelectorRequested() - } - } - } - } - } - - - property bool panelVisible: false - - - Timer { - interval: 2000 - repeat: true - running: panelVisible - onTriggered: checkRecordingStatus() - } - - function checkRecordingStatus() { - if (isRecording) { - checkRecordingProcess.running = true - } - } - - - Process { - id: checkRecordingProcess - command: ["pgrep", "-f", "gpu-screen-recorder.*portal"] - onExited: function(exitCode, exitStatus) { - var isActuallyRecording = exitCode === 0 - if (isRecording && !isActuallyRecording) { - recordingStateMismatch(isActuallyRecording) - } - } - } -} \ No newline at end of file