Browse files

Merge pull request #41 from egroeper/alignmentShortcuts

Alignment: Add shortcuts for alignment options
  • Loading branch information...
2 parents b585c99 + 253e1b8 commit ff48e16f48d3d4ddd200d78d9ed4cf712db8ee6d @amolenaar committed Dec 26, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 gaphor/plugins/alignment/__init__.py
View
12 gaphor/plugins/alignment/__init__.py
@@ -69,7 +69,7 @@ def getYCoordsBottom(self, items):
return [item.matrix[5] + item.height for item in items]
@action(name='align-left', label='Left',
- tooltip="Vertically align diagram elements on the left")
+ tooltip="Vertically align diagram elements on the left", accel='<control><shift>l')
@transactional
def align_left(self):
items = self.get_items()
@@ -80,7 +80,7 @@ def align_left(self):
item.request_update()
@action(name='align-center', label='Center',
- tooltip="Vertically align diagram elements on their centers")
+ tooltip="Vertically align diagram elements on their centers", accel='<control><shift>c')
@transactional
def align_center(self):
items = self.get_items()
@@ -93,7 +93,7 @@ def align_center(self):
item.request_update()
@action(name='align-right', label='Right',
- tooltip="Vertically align diagram elements on the right")
+ tooltip="Vertically align diagram elements on the right", accel='<control><shift>r')
@transactional
def align_right(self):
items = self.get_items()
@@ -104,7 +104,7 @@ def align_right(self):
item.request_update()
@action(name='align-top', label='Top',
- tooltip="Horizontally align diagram elements on their tops")
+ tooltip="Horizontally align diagram elements on their tops", accel='<control><shift>t')
@transactional
def align_top(self):
items = self.get_items()
@@ -115,7 +115,7 @@ def align_top(self):
item.request_update()
@action(name='align-middle', label='Middle',
- tooltip="Horizontally align diagram elements on their middles")
+ tooltip="Horizontally align diagram elements on their middles", accel='<control><shift>m')
@transactional
def align_middle(self):
items = self.get_items()
@@ -128,7 +128,7 @@ def align_middle(self):
item.request_update()
@action(name='align-bottom', label='Bottom',
- tooltip="Horizontally align diagram elements on their bottoms")
+ tooltip="Horizontally align diagram elements on their bottoms", accel='<control><shift>b')
@transactional
def align_bottom(self):
items = self.get_items()

0 comments on commit ff48e16

Please sign in to comment.