Skip to contentSkip to conversation

Improve default column widths by changing resize modes

PATCH Applied Andy Parkins 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 Improve default column widths by changing resize modes

The time column is not the best column to be auto stretched, it's probably a fixed width because it's only showing dates. The log column is more typically variable, so have that one be the one that takes up whatever space is left.

---
 src/listview.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
src/listview.cpp +4 -3
index 12066f3..45e696b 100644
@@ -64,15 +64,16 @@ void ListView::setupGeometry() {
 	setPalette(pl); // does not seem to inherit application paletteAnnotate
 
 	QHeaderView* hv = header();
-	hv->setStretchLastSection(true);
-	hv->setResizeMode(LOG_COL, QHeaderView::Interactive);
-	hv->setResizeMode(TIME_COL, QHeaderView::Interactive);
+	hv->setStretchLastSection(false);
+	hv->setResizeMode( LOG_COL, QHeaderView::Stretch );
+	hv->setResizeMode( TIME_COL, QHeaderView::Interactive);
 	hv->setResizeMode(ANN_ID_COL, QHeaderView::ResizeToContents);
 	hv->resizeSection(GRAPH_COL, DEF_GRAPH_COL_WIDTH);
 	hv->resizeSection(LOG_COL, DEF_LOG_COL_WIDTH);
 	hv->resizeSection(AUTH_COL, DEF_AUTH_COL_WIDTH);
 	hv->resizeSection(TIME_COL, DEF_TIME_COL_WIDTH);
 
+
 	if (git->isMainHistory(fh))
 		hideColumn(ANN_ID_COL);
 }
Signature · 1 line
1.5.0.rc4.gb4d2