wangp / bower

A curses terminal client for the Notmuch email system
Other
119 stars 11 forks source link

Increase max thread pane size after a certain point #71

Closed seifferth closed 3 years ago

seifferth commented 3 years ago

This is a proposal to solve the thread pane display on hidpi screens. Cf. https://github.com/wangp/bower/issues/60. It will use the previous maximum of 8 rows for the thread pane for terminal sizes of up to 40 rows. For larger terminals it will use 1/5 of the terminal size as the maximum. As it happens, 8/40 = 1/5, which ensures a seamless switch between the two. Switching back to relative size at a certain point removes all hard limits on the maximum thread pane size.

wangp commented 3 years ago

It looks reasonable.

The larger size does make it more obvious that the code to keep the cursor in the middle of the thread pane needs to be a bit smarter :)

seifferth commented 3 years ago

The larger size does make it more obvious that the code to keep the cursor in the middle of the thread pane needs to be a bit smarter :)

True. Maybe one could limit the maximum number of empty rows to 4 or something? But I guess that would be another issue.

wangp commented 3 years ago

Merged this one, thanks!