edit: Parent column get 1/6 width instead of 1/4.

This commit is contained in:
Qi Xiao 2017-12-30 20:50:48 +00:00
parent 7d81db1e04
commit 214d7a7a75

View File

@ -5,13 +5,13 @@ package edit
// width required to display the current and preview columns, and returns
// suitable widths for the columns.
//
// The parent column always gets 1/4 of the total width. The current and preview
// The parent column always gets 1/6 of the total width. The current and preview
// columns initially get 1/2 of the remaining width each, but if one of them
// does not have enough widths and another has some spare width, the amount of
// spare width or the needed width (whichever is smaller) is donated from the
// latter to the former.
func getNavWidths(total, currentFull, previewFull int) (int, int, int) {
parent := total / 4
parent := total / 6
remain := total - parent
current := remain / 2