summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-28 21:31:45 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-28 21:31:45 +0000
commit0ba7c3e6ec23ec15453418f146194f46b1369035 (patch)
treed171167e54f67d690a4d04ced6680176092d653c
parent8805dcd785ff929ba6de5dfd702cdd9750547368 (diff)
downloadportage-0ba7c3e6ec23ec15453418f146194f46b1369035.tar.gz
portage-0ba7c3e6ec23ec15453418f146194f46b1369035.tar.bz2
portage-0ba7c3e6ec23ec15453418f146194f46b1369035.zip
Cap the progress bar columns at 80 since it looks ridiculous when it gets too wide.
svn path=/main/trunk/; revision=6654
-rw-r--r--pym/portage/output.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py
index 75e043483..f5e261c82 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -476,6 +476,7 @@ class TermProgressBar(ProgressBar):
lines, self.term_columns = get_term_size()
self.file = sys.stdout
self._min_columns = 11
+ self._max_columns = 80
# for indeterminate mode, ranges from 0.0 to 1.0
self._position = 0.0
@@ -490,6 +491,8 @@ class TermProgressBar(ProgressBar):
def _create_image(self):
cols = self.term_columns
+ if cols > self._max_columns:
+ cols = self._max_columns
min_columns = self._min_columns
curval = self._curval
maxval = self._maxval