Skip to content
Browse files

Merge pull request #171 from jamie-pate/action_direction_upstream

Modify the aspect ratio at which the actions panel changes orientation.
  • Loading branch information...
2 parents b30d19d + 9ab385c commit 932178bf87ca675e2139fd19e082a546dcd1ac93 @davvid davvid committed Mar 28, 2013
Showing with 3 additions and 1 deletion.
  1. +2 −1 cola/qt.py
  2. +1 −0 cola/widgets/action.py
View
3 cola/qt.py
@@ -146,10 +146,11 @@ def __init__(self, parent):
QtGui.QSizePolicy.Minimum)
self.setSizePolicy(policy)
self.setMinimumSize(QtCore.QSize(1, 1))
+ self.aspect_ratio = 0.8
def resizeEvent(self, event):
size = event.size()
- if size.width() * 0.8 < size.height():
+ if size.width() * self.aspect_ratio < size.height():
dxn = self._vertical
else:
dxn = self._horizontal
View
1 cola/widgets/action.py
@@ -21,6 +21,7 @@ def __init__(self, parent=None):
self.push_button = create_button(text=N_('Push...'), layout=layout)
self.pull_button = create_button(text=N_('Pull...'), layout=layout)
self.stash_button = create_button(text=N_('Stash...'), layout=layout)
+ self.aspect_ratio = 0.4
layout.addStretch()
self.setMinimumHeight(30)

0 comments on commit 932178b

Please sign in to comment.
Something went wrong with that request. Please try again.