Skip to content

Commit

Permalink
Add border-sized padding for tree view items in Repository Browser
Browse files Browse the repository at this point in the history
Based on TortoiseSVN rev. 27317.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
  • Loading branch information
csware committed May 14, 2016
1 parent db40ecc commit 174eda0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/TortoiseProc/RepositoryBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,17 @@ BOOL CRepositoryBrowser::OnInitDialog()
SetWindowTheme(m_RepoTree.GetSafeHwnd(), L"Explorer", nullptr);
SetWindowTheme(m_RepoList.GetSafeHwnd(), L"Explorer", nullptr);

int borderWidth = 0;
if (IsAppThemed())
{
HTHEME hTheme = OpenThemeData(m_RepoTree, L"TREEVIEW");
GetThemeMetric(hTheme, NULL, TVP_TREEITEM, TREIS_NORMAL, TMT_BORDERSIZE, &borderWidth);
CloseThemeData(hTheme);
}
else
borderWidth = GetSystemMetrics(SM_CYBORDER);
m_RepoTree.SetItemHeight((SHORT)(m_RepoTree.GetItemHeight() + 2 * borderWidth));

m_nIconFolder = SYS_IMAGE_LIST().GetDirIconIndex();
m_nOpenIconFolder = SYS_IMAGE_LIST().GetDirOpenIconIndex();

Expand Down

0 comments on commit 174eda0

Please sign in to comment.