widget: code simplification Guessing orientation depends only on the screen size. The previous orientation is meaningless there.
1 files changed, 2 insertions(+), 2 deletions(-) M lairucrem/widgets/mainwidget.py
M lairucrem/widgets/mainwidget.py +2 -2
@@ 155,9 155,9 @@ class packer(delegate_to_widget_mixin('_ def _guess_orientation(self, size): cols = size[0] - if cols > 160 and self._orientation != 'horizontal': + if cols > 160: self._orientation = 'horizontal' - elif cols < 160 and self._orientation != 'vertical': + elif cols < 160: self._orientation = 'vertical' def keypress(self, size, key):