Make the summary pane narrower and listing pane wider.

- In portrait mode.
- In the average project there was a bit of wasted space.
  Python files (with lots of statuses) in a subdirectory had
  space left over. They can still be seen with the summary
  pane narrowed.
- Puts emphasis on viewing the listing over the summary pane.
- Contents were often a little too wide for the listing pane
  and now fit.
This commit is contained in:
Andrew Hamilton 2021-05-10 18:06:06 +10:00
parent f32a97cbbf
commit 77ce5c68b0
2 changed files with 65 additions and 61 deletions

View file

@ -728,6 +728,10 @@ class Screen:
smaller_height = max(height // 4, 10) smaller_height = max(height // 4, 10)
return [smaller_height, height - smaller_height] return [smaller_height, height - smaller_height]
def _partition_3(self, widgets, width):
smaller_width = max(int(width // 2.5), 10)
return [smaller_width, width - smaller_width]
def _make_widgets(self): def _make_widgets(self):
self._help_widget = Help(self._summary, self) self._help_widget = Help(self._summary, self)
root_path = os.path.basename(self._summary._root_path) root_path = os.path.basename(self._summary._root_path)
@ -743,10 +747,10 @@ class Screen:
log = fill3.Border(self._log, title="Log", log = fill3.Border(self._log, title="Log",
characters=Screen._DIMMED_BORDER) characters=Screen._DIMMED_BORDER)
port_log = fill3.Row([fill3.Column([summary, log], self._partition), port_log = fill3.Row([fill3.Column([summary, log], self._partition),
self._listing]) self._listing], self._partition_3)
land_log = fill3.Column([fill3.Row([summary, log]), self._listing], land_log = fill3.Column([fill3.Row([summary, log]), self._listing],
self._partition_2) self._partition_2)
port_no_log = fill3.Row([summary, self._listing]) port_no_log = fill3.Row([summary, self._listing], self._partition_3)
land_no_log = fill3.Column([summary, self._listing], self._partition_2) land_no_log = fill3.Column([summary, self._listing], self._partition_2)
self._layouts = [[land_no_log, port_no_log], [land_log, port_log]] self._layouts = [[land_no_log, port_no_log], [land_log, port_log]]
self._set_focus() self._set_focus()

View file

@ -1,60 +1,60 @@
┏━━━━━━━━━━━━━━ Summary of project ━━━━━━━━━━━━━━┓┌────────────────────────────────────────────────┐ ┏━━━━━━━━ Summary of project ━━━━━━━━┓┌────────────────────────────────────────────────────────────
│Nothing selected │ ┃ ┃│Nothing selected │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
│ │ ┃ ┃│ │
┃ ┃│ │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛│ │
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │ ┌─────────────── Log ────────────────┐ │
┌───────────────────── Log ──────────────────────┐ │  │ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
│ ││ │ │ ││ │
└────────────────────────────────────────────────┘└────────────────────────────────────────────────┘ └────────────────────────────────────┘└────────────────────────────────────────────────────────────┘
 help quit tab:focus orient log edit next sort refresh fullscreen xdg-open   help quit tab:focus orient log edit next sort refresh fullscreen xdg-open