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