commit fa77ada821231a50426185f23a27254d7e18c475 Author: Damian Johnson atagar@torproject.org Date: Tue Jul 12 09:48:31 2011 -0700
Using extra config panel width for values
When the configuration panel has enough space to show the whole summaries using the extra space for the value column instead. --- src/cli/configPanel.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/cli/configPanel.py b/src/cli/configPanel.py index d76a528..e4a48fc 100644 --- a/src/cli/configPanel.py +++ b/src/cli/configPanel.py @@ -528,6 +528,12 @@ class ConfigPanel(panel.Panel): valueWidth = self._config["features.config.state.colWidth.value"] descriptionWidth = max(0, width - scrollOffset - optionWidth - valueWidth - 2)
+ # if the description column is overly long then use its space for the + # value instead + if descriptionWidth > 80: + valueWidth += descriptionWidth - 80 + descriptionWidth = 80 + for lineNum in range(scrollLoc, len(self._getConfigOptions())): entry = self._getConfigOptions()[lineNum] drawLine = lineNum + detailPanelHeight + 1 - scrollLoc
tor-commits@lists.torproject.org