May 25, 2018 updates: Privacy Policy
  • R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28204 (tree)
Time2018-04-21 22:39:31
Authorstefankueng

Log Message

Fix high-dpi issues with the udiff viewer.

Change Summary

Incremental Difference

--- trunk/src/TortoiseUDiff/MainWindow.cpp (revision 28203)
+++ trunk/src/TortoiseUDiff/MainWindow.cpp (revision 28204)
@@ -26,6 +26,7 @@
2626 #include "CreateProcessHelper.h"
2727 #include "UDiffColors.h"
2828 #include "registry.h"
29+#include "DPIAware.h"
2930 #include <VersionHelpers.h>
3031
3132 const UINT TaskBarButtonCreated = RegisterWindowMessage(L"TaskbarButtonCreated");
@@ -114,11 +115,11 @@
114115 {
115116 ::SetWindowPos(m_hWndEdit, HWND_TOP,
116117 rect.left, rect.top,
117- rect.right-rect.left, rect.bottom-rect.top-30,
118+ rect.right - rect.left, rect.bottom - rect.top - int(30 * CDPIAware::Instance().ScaleFactorY()),
118119 SWP_SHOWWINDOW);
119120 ::SetWindowPos(m_FindBar, HWND_TOP,
120- rect.left, rect.bottom-30,
121- rect.right-rect.left, 30,
121+ rect.left, rect.bottom - int(30 * CDPIAware::Instance().ScaleFactorY()),
122+ rect.right - rect.left, int(30 * CDPIAware::Instance().ScaleFactorY()),
122123 SWP_SHOWWINDOW);
123124 }
124125 else
@@ -215,11 +216,11 @@
215216 GetClientRect(*this, &rect);
216217 ::SetWindowPos(m_hWndEdit, HWND_TOP,
217218 rect.left, rect.top,
218- rect.right-rect.left, rect.bottom-rect.top-30,
219+ rect.right - rect.left, rect.bottom - rect.top - int(30 * CDPIAware::Instance().ScaleFactorY()),
219220 SWP_SHOWWINDOW);
220221 ::SetWindowPos(m_FindBar, HWND_TOP,
221- rect.left, rect.bottom-30,
222- rect.right-rect.left, 30,
222+ rect.left, rect.bottom - int(30 * CDPIAware::Instance().ScaleFactorY()),
223+ rect.right - rect.left, int(30 * CDPIAware::Instance().ScaleFactorY()),
223224 SWP_SHOWWINDOW);
224225 ::SetFocus(m_FindBar);
225226 SendEditor(SCI_SETSELECTIONSTART, 0);
Show on old repository browser