blob: 5660330b7acdffed7baf294982c792d00fd95775 (
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
26
27
|
from mojo.events import addObserver
from lib.doodleMenus import SpaceCenterMenuForGlyph
from preferences import Preferences
class CustomSpaceCenterMenuForGlyph(SpaceCenterMenuForGlyph):
def __init__(self, glyph):
self._glyph = glyph
super(SpaceCenterMenuForGlyph, self).__init__()
class EqualizeSidebearings(object):
def __init__(self):
addObserver(self, 'equalize', 'spaceCenterKeyUp')
self.preferences = Preferences()
def equalize(self, info):
if info['event'].characters() == self.preferences.activation_key:
space_center_menu = CustomSpaceCenterMenuForGlyph(
info['glyph'].naked())
space_center_menu.equalSideBearings_(self)
EqualizeSidebearings()
|