aboutsummaryrefslogtreecommitdiffstats
path: root/preferences_window.py
blob: c7b479bd7768a054b763e6a354d6f301d43515ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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()


PreferencesWindow()