update
This commit is contained in:
@@ -15,6 +15,29 @@ NIconButton {
|
||||
property string section: ""
|
||||
|
||||
readonly property var mainInstance: pluginApi?.mainInstance
|
||||
readonly property bool hideInactive:
|
||||
pluginApi?.pluginSettings?.hideInactive ??
|
||||
pluginApi?.manifest?.metadata?.defaultSettings?.hideInactive ??
|
||||
false
|
||||
|
||||
readonly property bool shouldShow: !hideInactive || (mainInstance?.isRecording ?? false) || (mainInstance?.isPending ?? false)
|
||||
|
||||
visible: true
|
||||
opacity: shouldShow ? 1.0 : 0.0
|
||||
implicitWidth: shouldShow ? baseSize : 0
|
||||
implicitHeight: shouldShow ? baseSize : 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: Style.animationNormal }
|
||||
}
|
||||
|
||||
Behavior on implicitWidth {
|
||||
NumberAnimation { duration: Style.animationNormal }
|
||||
}
|
||||
|
||||
Behavior on implicitHeight {
|
||||
NumberAnimation { duration: Style.animationNormal }
|
||||
}
|
||||
|
||||
enabled: mainInstance?.isAvailable ?? false
|
||||
icon: "camera-video"
|
||||
@@ -49,11 +72,7 @@ NIconButton {
|
||||
}
|
||||
|
||||
onRightClicked: {
|
||||
var popupMenuWindow = PanelService.getPopupMenuWindow(screen);
|
||||
if (popupMenuWindow) {
|
||||
popupMenuWindow.showContextMenu(contextMenu);
|
||||
contextMenu.openAtItem(root, screen);
|
||||
}
|
||||
PanelService.showContextMenu(contextMenu, root, screen);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,10 +88,8 @@ NIconButton {
|
||||
]
|
||||
|
||||
onTriggered: action => {
|
||||
var popupMenuWindow = PanelService.getPopupMenuWindow(screen);
|
||||
if (popupMenuWindow) {
|
||||
popupMenuWindow.close();
|
||||
}
|
||||
contextMenu.close();
|
||||
PanelService.closeContextMenu(screen);
|
||||
|
||||
if (action === "widget-settings") {
|
||||
BarService.openPluginSettings(screen, pluginApi.manifest);
|
||||
|
||||
@@ -54,6 +54,7 @@ Item {
|
||||
}
|
||||
|
||||
// Settings shortcuts
|
||||
readonly property bool hideInactive: pluginApi?.pluginSettings?.hideInactive ?? false
|
||||
readonly property string directory: pluginApi?.pluginSettings?.directory || ""
|
||||
readonly property string filenamePattern: pluginApi?.pluginSettings?.filenamePattern || "recording_yyyyMMdd_HHmmss"
|
||||
readonly property string frameRate: pluginApi?.pluginSettings?.frameRate || "60"
|
||||
|
||||
@@ -11,6 +11,11 @@ ColumnLayout {
|
||||
|
||||
property var pluginApi: null
|
||||
|
||||
property bool editHideInactive:
|
||||
pluginApi?.pluginSettings?.hideInactive ??
|
||||
pluginApi?.manifest?.metadata?.defaultSettings?.hideInactive ??
|
||||
false
|
||||
|
||||
property string editDirectory:
|
||||
pluginApi?.pluginSettings?.directory ||
|
||||
pluginApi?.manifest?.metadata?.defaultSettings?.directory ||
|
||||
@@ -77,6 +82,7 @@ ColumnLayout {
|
||||
return
|
||||
}
|
||||
|
||||
pluginApi.pluginSettings.hideInactive = root.editHideInactive
|
||||
pluginApi.pluginSettings.directory = root.editDirectory
|
||||
pluginApi.pluginSettings.filenamePattern = root.editFilenamePattern
|
||||
pluginApi.pluginSettings.frameRate = root.editFrameRate
|
||||
@@ -137,6 +143,15 @@ ColumnLayout {
|
||||
defaultValue: pluginApi?.manifest?.metadata?.defaultSettings?.copyToClipboard ?? false
|
||||
}
|
||||
|
||||
// Hide When Inactive Toggle
|
||||
NToggle {
|
||||
label: pluginApi.tr("settings.general.hide-when-inactive")
|
||||
description: pluginApi.tr("settings.general.hide-when-inactive-description")
|
||||
checked: root.editHideInactive
|
||||
onToggled: root.editHideInactive = checked
|
||||
defaultValue: pluginApi?.manifest?.metadata?.defaultSettings?.hideInactive ?? false
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
"general": {
|
||||
"copy-to-clipboard": "In die Zwischenablage kopieren",
|
||||
"copy-to-clipboard-description": "Kopiere die Datei nach Abschluss der Aufnahme in die Zwischenablage.",
|
||||
"hide-when-inactive": "Bei Inaktivität ausblenden",
|
||||
"hide-when-inactive-description": "Widget in Statusleiste ausblenden, wenn keine Aufnahme stattfindet",
|
||||
"output-folder": "Ausgabeordner",
|
||||
"output-folder-description": "Ordner, in dem Bildschirmaufnahmen gespeichert werden",
|
||||
"show-cursor": "Cursor anzeigen",
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
"general": {
|
||||
"copy-to-clipboard": "Copy to clipboard",
|
||||
"copy-to-clipboard-description": "Copy the file to clipboard after recording finishes.",
|
||||
"hide-when-inactive": "Hide when inactive",
|
||||
"hide-when-inactive-description": "Hide the bar indicator when not recording",
|
||||
"output-folder": "Output folder",
|
||||
"output-folder-description": "Folder where screen recordings will be saved",
|
||||
"show-cursor": "Show cursor",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"id": "screen-recorder",
|
||||
"name": "Screen Recorder",
|
||||
"version": "1.0.8",
|
||||
"version": "1.1.2",
|
||||
"minNoctaliaVersion": "3.6.0",
|
||||
"author": "Noctalia Team",
|
||||
"official": true,
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/noctalia-dev/noctalia-plugins",
|
||||
"description": "Hardware-accelerated screen recording using gpu-screen-recorder with customizable video and audio settings",
|
||||
@@ -22,6 +23,7 @@
|
||||
},
|
||||
"metadata": {
|
||||
"defaultSettings": {
|
||||
"hideInactive": false,
|
||||
"directory": "",
|
||||
"filenamePattern": "recording_yyyyMMdd_HHmmss",
|
||||
"frameRate": "60",
|
||||
|
||||
Reference in New Issue
Block a user