From 881b906b44357eb565e436d2647527f10230cfc8 Mon Sep 17 00:00:00 2001 From: sezanzeb Date: Thu, 26 Nov 2020 00:07:28 +0100 Subject: [PATCH] rearranged the ui a bit --- data/key-mapper.glade | 607 ++++++++++++++++++++-------------------- keymapper/gtk/window.py | 5 +- 2 files changed, 312 insertions(+), 300 deletions(-) diff --git a/data/key-mapper.glade b/data/key-mapper.glade index 5f206f17..4355139b 100644 --- a/data/key-mapper.glade +++ b/data/key-mapper.glade @@ -261,53 +261,32 @@ document-save - 450 + -1 False Key Mapper + 350 mouse - + True False + vertical - + True False - vertical + 15 + 10 - + + 50 True False - 10 - 10 - - - True - False - Device - 13 - 0 - - - False - True - 0 - - - - - True - False - - - - True - True - 1 - - + Device + 13 + 0 False @@ -316,38 +295,138 @@ - + True False + - False + True True 1 - + + Apply Defaults + True + True + True + To give your keys back their original mapping. + end + gtk-redo-icon-2 + + + + False + False + 2 + + + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + + + + True + False + + True False - 10 vertical - 10 - + True False + 15 + vertical 10 - - gtk-apply - 80 + True - True - True - Presets need to be saved before they can be applied - True - + False + 10 + + + gtk-apply + 80 + True + True + True + Presets need to be saved before they can be applied + True + + + + False + True + 0 + + + + + Save + 80 + True + True + True + save-icon + + + + False + True + 1 + + + + + New + 80 + True + True + True + new-icon + + + + False + True + 2 + + + + + gtk-delete + 80 + True + True + True + True + + + + False + True + 4 + + False @@ -356,14 +435,38 @@ - - Save - 80 + True - True - True - save-icon - + False + 10 + + + 50 + True + False + Preset + 13 + 0 + + + False + True + 0 + + + + + 200 + True + False + + + + True + True + 1 + + False @@ -372,14 +475,35 @@ - - New - 80 + True - True - True - new-icon - + False + 10 + + + True + False + Rename + 13 + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + False @@ -388,166 +512,120 @@ - - gtk-delete - 80 + True - True - True - True - + False + + + True + False + Automatically load this preset + 0 + + + True + True + 0 + + + + + True + True + + + + False + True + 1 + + False True - 4 + 3 - False + True True - 0 + 2 - + True False - 10 - - - 50 - True - False - preset - 13 - 0 - - - False - True - 0 - - - - - 200 - True - False - - - - True - True - 1 - - False True - 1 + 4 - + True False - 10 - + True False - Rename - 13 - 0 + 10 + 10 + 10 + 10 + 6 + 6 + vertical + 2 - False + True True 0 - + True - True + False - True + False True 1 - - - False - True - 2 - - - - - True - False - + True False - Automatically load this preset - 0 - - - True - True - 0 - - - - - True - True - + This is the keycode you just pressed, and that you see in the mappings to the right. + 10 + 10 + 4 False True - 1 + 2 - True + False True - 3 + 5 True True - 2 - - - - - Apply Defaults - True - True - True - To give your keys back their original mapping. - end - 10 - 10 - 0 - gtk-redo-icon-2 - - - - False - False - 3 + 0 @@ -558,177 +636,110 @@ False True - 4 - - - - - True - False - - - True - False - 10 - 10 - 10 - 10 - 6 - 6 - vertical - 2 - - - True - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - This is the keycode you just pressed, and that you see in the mappings to the right. - 10 - 10 - 4 - - - False - True - 2 - - - - - False - True - 5 + 1 - - - True - True - 0 - - - - - True - False - - - False - True - 1 - - - - - 250 - True - False - vertical + 250 True False + vertical - - 50 - True - False - Click on a cell below and hit a key on your device. If you have your preset active, the reported keycodes may be wrong. - 5 - 5 - Key - - - False - True - 0 - - - - + True False - a-z, A-Z, 0-9 + + + 50 + True + False + Click on a cell below and hit a key on your device. If you have your preset active, the reported keycodes may be wrong. + 5 + 5 + Key + + + False + True + 0 + + + + + True + False + a-z, A-Z, 0-9 "KP_0" - "KP_9" "Shift_L", "Shift_R" "Alt_L", "Alt_R" "Control_R" - 5 - 5 - Mapping + 5 + 5 + Mapping + + + True + True + 1 + + + + + 50 + True + False + + + False + True + 2 + + + - True + False True - 1 + 0 - - 50 + True False False True - 2 + 1 - - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - True - + True - False + True - + True False - none + + + True + False + none + + + + True + True + 2 + diff --git a/keymapper/gtk/window.py b/keymapper/gtk/window.py index ff481ed7..80273147 100755 --- a/keymapper/gtk/window.py +++ b/keymapper/gtk/window.py @@ -102,7 +102,7 @@ class Window: window = self.get('window') window.show() # hide everything until stuff is populated - self.get('wrapper').set_opacity(0) + self.get('vertical-wrapper').set_opacity(0) self.window = window # if any of the next steps take a bit to complete, have the window @@ -116,7 +116,7 @@ class Window: self.timeout = GLib.timeout_add(100, self.check_add_row) # now show the proper finished content of the window - self.get('wrapper').set_opacity(1) + self.get('vertical-wrapper').set_opacity(1) def get(self, name): """Get a widget from the window""" @@ -293,6 +293,7 @@ class Window: device = self.selected_device preset = self.selected_preset # TODO test call this and then check config + # TODO new screenshot config.set_autoload_preset(device, preset, active) config.save_config()