aboutsummaryrefslogtreecommitdiffstats
path: root/preferences_window.py
diff options
context:
space:
mode:
Diffstat (limited to 'preferences_window.py')
-rw-r--r--preferences_window.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/preferences_window.py b/preferences_window.py
new file mode 100644
index 0000000..11d3b52
--- /dev/null
+++ b/preferences_window.py
@@ -0,0 +1,26 @@
+import vanilla
+
+from preferences import Preferences
+
+
+class PreferencesWindow(object):
+
+ def __init__(self):
+ self.preferences = Preferences()
+
+ self.w = vanilla.Window((150, 50), 'Equalize Sidebearings')
+ self.w.activation_key_label = vanilla.TextBox(
+ (10, 15, -10, 22),
+ 'Short Key:')
+ self.w.activation_key = vanilla.EditText(
+ posSize=(82, 12, -10, 25),
+ text=self.preferences.activation_key,
+ callback=self.edit_text_callback)
+ self.w.open()
+
+ def edit_text_callback(self, sender):
+ self.preferences.activation_key = sender.get()
+ self.preferences.save()
+
+
+PreferencesWindow()