{"thread":{"id":"6727","subject":"[PATCH] qgit: Improve default column widths by changing resize modes","startedAt":"2007-02-07T21:39:22Z","lastAt":"2007-02-07T21:39:35Z","messageCount":2,"participants":["Andy Parkins"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"33856","messageId":"200702072139.22272.andyparkins@gmail.com","threadId":"6727","inReplyTo":"75ebbfaed42a61c54ec6a38bc60d5e777a074dc5.1170884269.git.andyparkins@gmail.com","subject":"[PATCH] qgit: Improve default column widths by changing resize modes","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-07T21:39:22Z","receivedAt":"2007-02-07T21:39:22Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"The time column is not the best column to be auto stretched, it's\nprobably a fixed width because it's only showing dates.  The log column\nis more typically variable, so have that one be the one that takes up\nwhatever space is left.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n src/common.h     |    2 +-\n src/listview.cpp |    6 +++++-\n 2 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/src/common.h b/src/common.h\nindex e3da323..43b5527 100644\n--- a/src/common.h\n+++ b/src/common.h\n@@ -158,7 +158,7 @@ namespace QGit {\n \tconst int DEF_GRAPH_COL_WIDTH = 80;\n \tconst int DEF_LOG_COL_WIDTH   = 500;\n \tconst int DEF_AUTH_COL_WIDTH  = 230;\n-\tconst int DEF_TIME_COL_WIDTH  = 130;\n+\tconst int DEF_TIME_COL_WIDTH  = 160;\n \n \t// colors\n \textern const QColor BROWN;\ndiff --git a/src/listview.cpp b/src/listview.cpp\nindex d5f8daf..91be60a 100644\n--- a/src/listview.cpp\n+++ b/src/listview.cpp\n@@ -64,12 +64,16 @@ void ListView::setupGeometry() {\n \tsetPalette(pl); // does not seem to inherit application \npaletteAnnotate\n \n \tQHeaderView* hv = header();\n-\thv->resizeSection(GRAPH_COL, DEF_GRAPH_COL_WIDTH);\n+\thv->setStretchLastSection( false );\n+\thv->setResizeMode( LOG_COL, QHeaderView::Stretch );\n+\thv->setResizeMode( TIME_COL, QHeaderView::Interactive);\n \thv->setResizeMode(ANN_ID_COL, QHeaderView::ResizeToContents);\n+\thv->resizeSection(GRAPH_COL, DEF_GRAPH_COL_WIDTH);\n \thv->resizeSection(LOG_COL, DEF_LOG_COL_WIDTH);\n \thv->resizeSection(AUTH_COL, DEF_AUTH_COL_WIDTH);\n \thv->resizeSection(TIME_COL, DEF_TIME_COL_WIDTH);\n \n+\n \tif (git->isMainHistory(fh))\n \t\thideColumn(ANN_ID_COL);\n }\n-- \n1.5.0.rc1.gf4b6c\n"},{"id":"33857","messageId":"200702072139.35393.andyparkins@gmail.com","threadId":"6727","inReplyTo":"75ebbfaed42a61c54ec6a38bc60d5e777a074dc5.1170884269.git.andyparkins@gmail.com","subject":"[PATCH] Make file tree to tab widget ratio 1:5","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-07T21:39:35Z","receivedAt":"2007-02-07T21:39:35Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"Signed-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n src/mainview.ui |   18 +++++++++++++++++-\n 1 files changed, 17 insertions(+), 1 deletions(-)\n\ndiff --git a/src/mainview.ui b/src/mainview.ui\nindex 5376291..7919b5d 100644\n--- a/src/mainview.ui\n+++ b/src/mainview.ui\n@@ -29,6 +29,14 @@\n        <enum>Qt::Horizontal</enum>\n       </property>\n       <widget class=\"TreeView\" name=\"treeView\" >\n+       <property name=\"sizePolicy\" >\n+        <sizepolicy>\n+         <hsizetype>7</hsizetype>\n+         <vsizetype>13</vsizetype>\n+         <horstretch>1</horstretch>\n+         <verstretch>0</verstretch>\n+        </sizepolicy>\n+       </property>\n        <property name=\"contextMenuPolicy\" >\n         <enum>Qt::CustomContextMenu</enum>\n        </property>\n@@ -48,6 +56,14 @@\n        </column>\n       </widget>\n       <widget class=\"QTabWidget\" name=\"tabWdg\" >\n+       <property name=\"sizePolicy\" >\n+        <sizepolicy>\n+         <hsizetype>7</hsizetype>\n+         <vsizetype>7</vsizetype>\n+         <horstretch>5</horstretch>\n+         <verstretch>0</verstretch>\n+        </sizepolicy>\n+       </property>\n        <widget class=\"QWidget\" name=\"TabWdg\" >\n         <attribute name=\"title\" >\n          <string>Tab&amp;Wdg</string>\n@@ -90,7 +106,7 @@\n      <x>0</x>\n      <y>0</y>\n      <width>975</width>\n-     <height>32</height>\n+     <height>31</height>\n     </rect>\n    </property>\n    <widget class=\"QMenu\" name=\"Edit\" >\n-- \n1.5.0.rc1.gf4b6c\n"}]}