Skip to content

Commit cdda640

Browse files
committed
Import older const/flags
1 parent 28b7ba6 commit cdda640

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed
Binary file not shown.
Binary file not shown.

CJKAnchorPlacement.glyphsTool/Contents/Resources/plugin.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
import objc
44
from GlyphsApp import *
55
from GlyphsApp.plugins import *
6-
from AppKit import NSApplication, NSGraphicsContext, NSColor, NSMakeRect, NSInsetRect, NSMakePoint, NSAlternateKeyMask, NSBeep, NSNumberFormatter, NSValueTransformer, NSEventTypeLeftMouseDown, NSEventTypeLeftMouseDragged, NSEventTypeMouseMoved, NSEventTypeLeftMouseUp, NSEventTypePressure, NSEventTypeTabletPoint
6+
from AppKit import NSApplication, NSGraphicsContext, NSColor, NSMakeRect, NSInsetRect, NSMakePoint, NSAlternateKeyMask, NSBeep, NSNumberFormatter, NSValueTransformer, NSLeftMouseDown, NSLeftMouseUp, NSMouseMoved, NSLeftMouseDragged
7+
78
from Foundation import NSNotFound, NSNumber, NSMutableDictionary
89
import math
910
import collections
1011
import contextlib
1112

13+
VALID_EVENT_TYPES = (NSLeftMouseDown, NSLeftMouseUp, NSMouseMoved, NSLeftMouseDragged)
14+
1215
@contextlib.contextmanager
1316
def currentGraphicsContext(context=None):
1417
context = context or NSGraphicsContext.currentContext()
@@ -321,10 +324,9 @@ def background(self, layer):
321324
font = layer.parent.parent
322325
master = font.masters[layer.associatedMasterId or layer.layerId]
323326
event = NSApplication.sharedApplication().currentEvent()
324-
valid_event_types = (NSEventTypeLeftMouseDragged, NSEventTypeMouseMoved, NSEventTypeLeftMouseUp, NSEventTypePressure, NSEventTypeTabletPoint)
325327
arrange_anchors(font, master, layer)
326328
self.update_grid_subdivision(event)
327-
self.sync_values(font, master, layer, needs_round=event.type() in valid_event_types if event else False)
329+
self.sync_values(font, master, layer, needs_round=event.type() in VALID_EVENT_TYPES if event else False)
328330
with currentGraphicsContext() as ctx:
329331
dotted = False
330332
has_unbalanced_palt = sum((1 if value is None else 0 for value in (self.LSBValue, self.RSBValue))) == 1

CJKAnchorPlacement.glyphsTool/Contents/_CodeSignature/CodeResources

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</data>
1515
<key>Resources/plugin.py</key>
1616
<data>
17-
KIJgddwP2E0BZMyWXnUB+520KmE=
17+
uBZM8UQnplFPta0i8hON3J/It/k=
1818
</data>
1919
<key>Resources/toolbar.ai</key>
2020
<data>
@@ -53,11 +53,11 @@
5353
<dict>
5454
<key>hash</key>
5555
<data>
56-
KIJgddwP2E0BZMyWXnUB+520KmE=
56+
uBZM8UQnplFPta0i8hON3J/It/k=
5757
</data>
5858
<key>hash2</key>
5959
<data>
60-
FzufauSDJm/r2jgE6MgqxCnnGYSnk810dqKntpEMoKY=
60+
lX3DfAJUeJzJwdvkXwmDBw9ZyvRSsaTfyIdlQqgEWuY=
6161
</data>
6262
</dict>
6363
<key>Resources/toolbar.ai</key>

0 commit comments

Comments
 (0)