From 4a64639fdfe1e2593b1127de3e42fd7ffb8fdf3e Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Tue, 7 May 2024 13:36:02 -0700
Subject: [PATCH] Use shortcut widget for nicer display of shortcuts
---
.../com.xronlinux.BreezyDesktop.gschema.xml | 4 +-
ui/src/breezydesktop.gresource.xml | 1 -
ui/src/connecteddevice.py | 6 +-
ui/src/gtk/connected-device.ui | 56 ++++++++++++++-----
ui/src/gtk/window.ui | 17 +-----
ui/src/shortcutdialog.py | 22 ++++----
ui/src/window.py | 13 ++---
7 files changed, 65 insertions(+), 54 deletions(-)
diff --git a/ui/data/com.xronlinux.BreezyDesktop.gschema.xml b/ui/data/com.xronlinux.BreezyDesktop.gschema.xml
index 004df11..e320ff2 100644
--- a/ui/data/com.xronlinux.BreezyDesktop.gschema.xml
+++ b/ui/data/com.xronlinux.BreezyDesktop.gschema.xml
@@ -12,7 +12,7 @@
- space', 'Ctrl+Super+Space']]]>
+ space']]]>
Re-center display
@@ -21,7 +21,7 @@
- Return', 'Ctrl+Super+Return']]]>
+ Return']]]>
Trigger change to display distance
diff --git a/ui/src/breezydesktop.gresource.xml b/ui/src/breezydesktop.gresource.xml
index 540448f..a84a9fb 100644
--- a/ui/src/breezydesktop.gresource.xml
+++ b/ui/src/breezydesktop.gresource.xml
@@ -5,6 +5,5 @@
gtk/no-device.ui
gtk/shortcut-dialog.ui
gtk/window.ui
- gtk/help-overlay.ui
diff --git a/ui/src/connecteddevice.py b/ui/src/connecteddevice.py
index 23abb92..6fd0ab7 100644
--- a/ui/src/connecteddevice.py
+++ b/ui/src/connecteddevice.py
@@ -12,7 +12,9 @@ class ConnectedDevice(Gtk.Box):
set_toggle_display_distance_start_button = Gtk.Template.Child()
set_toggle_display_distance_end_button = Gtk.Template.Child()
reassign_recenter_display_shortcut_button = Gtk.Template.Child()
+ recenter_display_shortcut_label = Gtk.Template.Child()
reassign_toggle_display_distance_shortcut_button = Gtk.Template.Child()
+ toggle_display_distance_shortcut_label = Gtk.Template.Child()
def __init__(self):
super(Gtk.Box, self).__init__()
@@ -23,8 +25,8 @@ class ConnectedDevice(Gtk.Box):
self.settings.bind('effect-enable', self.effect_enable_switch, 'active', Gio.SettingsBindFlags.DEFAULT)
bind_shortcut_settings(self.get_parent(), [
- self.reassign_recenter_display_shortcut_button,
- self.reassign_toggle_display_distance_shortcut_button
+ [self.reassign_recenter_display_shortcut_button, self.recenter_display_shortcut_label],
+ [self.reassign_toggle_display_distance_shortcut_button, self.toggle_display_distance_shortcut_label]
])
self.bind_set_distance_toggle([
diff --git a/ui/src/gtk/connected-device.ui b/ui/src/gtk/connected-device.ui
index d831291..6b911dd 100644
--- a/ui/src/gtk/connected-device.ui
+++ b/ui/src/gtk/connected-device.ui
@@ -69,20 +69,33 @@
-
-
-
-
-
-
-
-
-
-