Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 28, 2013
Jamie Pate Modify aspect ratio at which the actions panel will switch from h to …
…v layout

Added aspect_ratio property to QFlowLayoutWidget so each individual
widget can choose when it will switch between _horizontal and _vertical
9ab385c
Commits on Mar 29, 2013
@davvid davvid Merge pull request #171 from jamie-pate/action_direction_upstream
Modify the aspect ratio at which the actions panel changes orientation.
932178b
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)

No commit comments for this range

Something went wrong with that request. Please try again.