summaryrefslogtreecommitdiff
path: root/noctalia/.config/plugins/keybind-cheatsheet/BarWidget.qml
diff options
context:
space:
mode:
Diffstat (limited to 'noctalia/.config/plugins/keybind-cheatsheet/BarWidget.qml')
-rw-r--r--noctalia/.config/plugins/keybind-cheatsheet/BarWidget.qml75
1 files changed, 0 insertions, 75 deletions
diff --git a/noctalia/.config/plugins/keybind-cheatsheet/BarWidget.qml b/noctalia/.config/plugins/keybind-cheatsheet/BarWidget.qml
deleted file mode 100644
index 349d9cc..0000000
--- a/noctalia/.config/plugins/keybind-cheatsheet/BarWidget.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-import QtQuick
-import Quickshell
-import qs.Commons
-import qs.Services.UI
-import qs.Widgets
-
-NIconButton {
- id: root
-
- property var pluginApi: null
- property ShellScreen screen
- property string widgetId: ""
- property string section: ""
- property int sectionWidgetIndex: -1
- property int sectionWidgetsCount: 0
-
- baseSize: Style.getCapsuleHeightForScreen(screen?.name)
- applyUiScale: false
- icon: "keyboard"
- tooltipText: pluginApi?.tr("barwidget.tooltip")
- tooltipDirection: BarService.getTooltipDirection(screen?.name)
- customRadius: Style.radiusL
-
- colorBg: Style.capsuleColor
- colorFg: Color.mOnSurface
- colorBgHover: Color.mHover
- colorFgHover: Color.mOnHover
- colorBorder: "transparent"
- colorBorderHover: "transparent"
-
- border.color: Style.capsuleBorderColor
- border.width: Style.capsuleBorderWidth
-
- NPopupContextMenu {
- id: contextMenu
-
- model: [
- {
- "label": pluginApi?.tr("barwidget.open"),
- "action": "open-panel",
- "icon": "keyboard"
- },
- {
- "label": pluginApi?.tr("barwidget.settings"),
- "action": "plugin-settings",
- "icon": "settings"
- },
- ]
-
- onTriggered: action => {
- contextMenu.close();
- PanelService.closeContextMenu(screen);
-
- if (action === "open-panel") {
- if (pluginApi) {
- pluginApi.openPanel(screen);
- }
- } else if (action === "plugin-settings") {
- if (pluginApi) {
- BarService.openPluginSettings(screen, pluginApi.manifest);
- }
- }
- }
- }
-
- onClicked: {
- if (pluginApi) {
- pluginApi.openPanel(screen);
- }
- }
-
- onRightClicked: {
- PanelService.showContextMenu(contextMenu, root, screen);
- }
-}