• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28320 (tree)
Time2018-07-28 02:10:57
Authorstefankueng

Log Message

Merged revision(s) r28300, r28304 from trunk:
* Fix high-dpi loading of filter edit icons: the sizes are passed as 96 dpi, not 72 as for fonts.
* Fix dragging the slider in TortoiseIDiff when only two images are shown.

Change Summary

Incremental Difference

--- branches/1.10.x/src/Utils/MiscUI/FilterEdit.cpp (revision 28319)
+++ branches/1.10.x/src/Utils/MiscUI/FilterEdit.cpp (revision 28320)
@@ -399,9 +399,11 @@
399399
400400 HICON CFilterEdit::LoadDpiScaledIcon(UINT resourceId, int cx96dpi, int cy96dpi)
401401 {
402- int cx = CDPIAware::Instance().PointsToPixels(cx96dpi);
403- int cy = CDPIAware::Instance().PointsToPixels(cy96dpi);
402+ CWindowDC dc(this);
404403
404+ int cx = MulDiv(cx96dpi, dc.GetDeviceCaps(LOGPIXELSX), 96);
405+ int cy = MulDiv(cy96dpi, dc.GetDeviceCaps(LOGPIXELSY), 96);
406+
405407 return (HICON)LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(resourceId), IMAGE_ICON, cx, cy, LR_DEFAULTCOLOR);
406408 }
407409
--- branches/1.10.x/src/TortoiseIDiff/MainWindow.cpp (revision 28319)
+++ branches/1.10.x/src/TortoiseIDiff/MainWindow.cpp (revision 28320)
@@ -926,32 +926,46 @@
926926 #define MINWINSIZE 10
927927 if (bVertical)
928928 {
929- if (bDrag2)
929+ if (selectionPaths.size() != 3)
930930 {
931- if (pt.y < (nSplitterPos+MINWINSIZE))
932- pt.y = nSplitterPos+MINWINSIZE;
933- nSplitterPos2 = pt.y;
931+ nSplitterPos = pt.y;
934932 }
935933 else
936934 {
937- if (pt.y > (nSplitterPos2-MINWINSIZE))
938- pt.y = nSplitterPos2-MINWINSIZE;
939- nSplitterPos = pt.y;
935+ if (bDrag2)
936+ {
937+ if (pt.y < (nSplitterPos+MINWINSIZE))
938+ pt.y = nSplitterPos+MINWINSIZE;
939+ nSplitterPos2 = pt.y;
940+ }
941+ else
942+ {
943+ if (pt.y > (nSplitterPos2-MINWINSIZE))
944+ pt.y = nSplitterPos2-MINWINSIZE;
945+ nSplitterPos = pt.y;
946+ }
940947 }
941948 }
942949 else
943950 {
944- if (bDrag2)
951+ if (selectionPaths.size() != 3)
945952 {
946- if (pt.x < (nSplitterPos+MINWINSIZE))
947- pt.x = nSplitterPos+MINWINSIZE;
948- nSplitterPos2 = pt.x;
953+ nSplitterPos = pt.x;
949954 }
950955 else
951956 {
952- if (pt.x > (nSplitterPos2-MINWINSIZE))
953- pt.x = nSplitterPos2-MINWINSIZE;
954- nSplitterPos = pt.x;
957+ if (bDrag2)
958+ {
959+ if (pt.x < (nSplitterPos+MINWINSIZE))
960+ pt.x = nSplitterPos+MINWINSIZE;
961+ nSplitterPos2 = pt.x;
962+ }
963+ else
964+ {
965+ if (pt.x > (nSplitterPos2-MINWINSIZE))
966+ pt.x = nSplitterPos2-MINWINSIZE;
967+ nSplitterPos = pt.x;
968+ }
955969 }
956970 }
957971
Show on old repository browser