From 52987330bd74b9ded7e257edb573bf23f9d15c31 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 25 Jun 2016 16:50:02 +0200 Subject: [PATCH] Improve default width for action column Signed-off-by: Sven Strickroth Signed-off-by: Sup Yut Sum --- src/TortoiseProc/GitLogListBase.cpp | 2 +- src/TortoiseProc/GitStatusListCtrlHelpers.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TortoiseProc/GitLogListBase.cpp b/src/TortoiseProc/GitLogListBase.cpp index 759bc4ef7..af189d654 100644 --- a/src/TortoiseProc/GitLogListBase.cpp +++ b/src/TortoiseProc/GitLogListBase.cpp @@ -378,7 +378,7 @@ void CGitLogListBase::InsertGitColumn() ICONITEMBORDER+16*4, ICONITEMBORDER+16*4, ICONITEMBORDER+16*4, - ICONITEMBORDER+16*4, + 2*ICONITEMBORDER+16*4, LOGLIST_MESSAGE_MIN, ICONITEMBORDER+16*4, ICONITEMBORDER+16*4, diff --git a/src/TortoiseProc/GitStatusListCtrlHelpers.cpp b/src/TortoiseProc/GitStatusListCtrlHelpers.cpp index 0a5c3bd31..448f5aa25 100644 --- a/src/TortoiseProc/GitStatusListCtrlHelpers.cpp +++ b/src/TortoiseProc/GitStatusListCtrlHelpers.cpp @@ -294,10 +294,10 @@ int ColumnManager::GetWidth (int column, bool useDefaults) const { int cx = control->GetStringWidth(GetName(column)) + 20; // 20 pixels for col separator and margin - for (int index = 0, itemCnt = control->GetItemCount(); index < itemCnt; ++index) + for (int i = 0, itemCnt = control->GetItemCount(); i < itemCnt; ++i) { // get the width of the string and add 14 pixels for the column separator and margins - int linewidth = control->GetStringWidth(control->GetItemText(index,column)) + 14; + int linewidth = control->GetStringWidth(control->GetItemText(i, column)) + 14; if (cx < linewidth) cx = linewidth; } -- 2.11.4.GIT