• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28272 (tree)
Time2018-07-07 17:35:10
Authorstefankueng

Log Message

Adjust the background icon size for high dpi monitors.

Change Summary

Incremental Difference

--- trunk/src/Utils/CommonAppUtils.cpp (revision 28271)
+++ trunk/src/Utils/CommonAppUtils.cpp (revision 28272)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2010-2017 - TortoiseSVN
3+// Copyright (C) 2010-2018 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -29,6 +29,7 @@
2929 #include "SmartHandle.h"
3030 #include "PreserveChdir.h"
3131 #include "OnOutOfScope.h"
32+#include "DPIAware.h"
3233 #include <WinInet.h>
3334 #include <oleacc.h>
3435 #include <initguid.h>
@@ -317,6 +318,12 @@
317318 }
318319 }
319320
321+bool CCommonAppUtils::SetListCtrlBackgroundImage(HWND hListCtrl, UINT nID)
322+{
323+ auto size = CDPIAware::Instance().Scale(128);
324+ return SetListCtrlBackgroundImage(hListCtrl, nID, size, size);
325+}
326+
320327 bool CCommonAppUtils::SetListCtrlBackgroundImage(HWND hListCtrl, UINT nID, int width /* = 128 */, int height /* = 128 */)
321328 {
322329 ListView_SetTextBkColor(hListCtrl, CLR_NONE);
--- trunk/src/Utils/CommonAppUtils.h (revision 28271)
+++ trunk/src/Utils/CommonAppUtils.h (revision 28272)
@@ -1,6 +1,6 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2010-2012, 2014, 2016-2017 - TortoiseSVN
3+// Copyright (C) 2010-2012, 2014, 2016-2018 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -84,7 +84,8 @@
8484 */
8585 static void ResizeAllListCtrlCols(CListCtrl * pListCtrl);
8686
87- static bool SetListCtrlBackgroundImage(HWND hListCtrl, UINT nID, int width = 128, int height = 128);
87+ static bool SetListCtrlBackgroundImage(HWND hListCtrl, UINT nID);
88+ static bool SetListCtrlBackgroundImage(HWND hListCtrl, UINT nID, int width, int height);
8889
8990 /**
9091 * Creates a .lnk file (a windows shortcut file)
Show on old repository browser