History table: adapt column widths when view size changes
commit7011de74a8fd125677b6a9261d6fbddd51081c99
authorThomas Wolf <thomas.wolf@paranor.ch>
Sat, 21 Jul 2018 18:39:41 +0000 (21 20:39 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 29 Jul 2018 21:36:03 +0000 (29 23:36 +0200)
treee4625ed65d9a74db4817ee3da4a7a2dd0bcfadd0
parent45535c1540457b2cd490b4ab9f1f14f74d4c49a8
History table: adapt column widths when view size changes

Use a TableColumnLayout; give columns minimum widths, and give the
commit ID column a fixed size. Re-layout the table when the width
changes, and if the table then doesn't fit the view, re-distribute
all column widths afresh.

This results in the table always using at least the available width,
and getting a horizontal scroll bar only if the user makes columns so
wide that they cannot fit the view. (Or makes the view that small.)

Bug: 537181
Change-Id: Ic105acd0ffc7877e8834888b841e3f0aa96993cb
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java