• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28248 (tree)
Time2018-06-07 02:56:21
Authorstefankueng

Log Message

Merged revision(s) r28232, r28237, r28240, r28243, r28244, r28245, r28247 from trunk:
* When trying to show a diff for added files, only use DiffSelectedFile() if there's only one file selected. If multiple files are selected, fall back to DoDiffFromLog() with the same revision twice.
* high-dpi fixes for the about dialog.
* high-dpi fixes for TortoiseBlame.
* Get the default fonts via SystemParametersInfo(SPI_GETNONCLIENTMETRICS,..) instead of using the stock fonts: the stock fonts don't scale on high dpi displays and therefore are way too small.
* use the caption height of the non-client-metrics instead of misusing a tab control. This also fixes wrong heights in high-dpi setups.
* Adjust the revision graph for high-dpi displays.
* Show the url from where the update happens in the progress dialog.

Change Summary

Incremental Difference

--- branches/1.10.x/ext/TreePropSheet/PropPageFrame.h (revision 28247)
+++ branches/1.10.x/ext/TreePropSheet/PropPageFrame.h (revision 28248)
@@ -292,6 +292,8 @@
292292
293293 /** Style to use when drawing the message text m_strMsg. */
294294 DWORD m_dwMsgFormat;
295+
296+ HFONT m_uiFont;
295297 };
296298
297299
--- branches/1.10.x/ext/TreePropSheet/PropPageFrame.cpp (revision 28247)
+++ branches/1.10.x/ext/TreePropSheet/PropPageFrame.cpp (revision 28248)
@@ -40,13 +40,20 @@
4040 : m_bShowCaption(FALSE),
4141 m_nCaptionHeight(0),
4242 m_hCaptionIcon(NULL),
43- m_dwMsgFormat(DT_CENTER|DT_VCENTER|DT_NOPREFIX|DT_SINGLELINE)
43+ m_dwMsgFormat(DT_CENTER|DT_VCENTER|DT_NOPREFIX|DT_SINGLELINE),
44+ m_uiFont(0)
4445 {
46+ NONCLIENTMETRICS metrics = { 0 };
47+ metrics.cbSize = sizeof(NONCLIENTMETRICS);
48+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, FALSE);
49+ m_uiFont = CreateFontIndirect(&metrics.lfMessageFont);
4550 }
4651
4752
4853 CPropPageFrame::~CPropPageFrame()
4954 {
55+ if (m_uiFont)
56+ DeleteObject(m_uiFont);
5057 }
5158
5259
@@ -148,13 +155,13 @@
148155
149156 void CPropPageFrame::DrawMsg(CDC *pDc, CRect rect, LPCTSTR /*lpszMsg*/, DWORD /*dwFormat*/)
150157 {
151- CFont *pPrevFont = dynamic_cast<CFont*>(pDc->SelectStockObject(DEFAULT_GUI_FONT));
152- int nPrevBkMode = pDc->SetBkMode(TRANSPARENT);
158+ auto hOldFont = pDc->SelectObject(m_uiFont);
159+ int nPrevBkMode = pDc->SetBkMode(TRANSPARENT);
153160
154161 pDc->DrawText(GetMsgText(), rect, GetMsgFormat());
155162
156163 pDc->SetBkMode(nPrevBkMode);
157- pDc->SelectObject(pPrevFont);
164+ pDc->SelectObject(hOldFont);
158165 }
159166
160167
--- branches/1.10.x/ext/TreePropSheet/TreePropSheet.cpp (revision 28247)
+++ branches/1.10.x/ext/TreePropSheet/TreePropSheet.cpp (revision 28248)
@@ -801,13 +801,10 @@
801801 rectTree.right = rectTree.left + nTreeWidth - nTreeSpace;
802802
803803 // calculate caption height
804- CTabCtrl wndTabCtrl;
805- wndTabCtrl.Create(WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS, rectFrame, this, 0x1234);
806- wndTabCtrl.InsertItem(0, _T(""));
807- CRect rectFrameCaption;
808- wndTabCtrl.GetItemRect(0, rectFrameCaption);
809- wndTabCtrl.DestroyWindow();
810- m_pFrame->SetCaptionHeight(rectFrameCaption.Height());
804+ NONCLIENTMETRICS metrics = { 0 };
805+ metrics.cbSize = sizeof(NONCLIENTMETRICS);
806+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, FALSE);
807+ m_pFrame->SetCaptionHeight(metrics.iCaptionHeight);
811808
812809 // if no caption should be displayed, make the window smaller in
813810 // height
@@ -816,20 +813,20 @@
816813 // make frame smaller
817814 m_pFrame->GetWnd()->GetWindowRect(rectFrame);
818815 ScreenToClient(rectFrame);
819- rectFrame.top+= rectFrameCaption.Height();
816+ rectFrame.top+= metrics.iCaptionHeight;
820817 m_pFrame->GetWnd()->MoveWindow(rectFrame);
821818
822819 // move all child windows up
823- MoveChildWindows(0, -rectFrameCaption.Height());
820+ MoveChildWindows(0, -metrics.iCaptionHeight);
824821
825822 // modify rectangle for the tree ctrl
826- rectTree.bottom-= rectFrameCaption.Height();
823+ rectTree.bottom-= metrics.iCaptionHeight;
827824
828825 // make us smaller
829826 CRect rect;
830827 GetWindowRect(rect);
831- rect.top+= rectFrameCaption.Height()/2;
832- rect.bottom-= rectFrameCaption.Height()-rectFrameCaption.Height()/2;
828+ rect.top+= metrics.iCaptionHeight /2;
829+ rect.bottom -= metrics.iCaptionHeight - metrics.iCaptionHeight / 2;
833830 if (GetParent())
834831 GetParent()->ScreenToClient(rect);
835832 MoveWindow(rect);
--- branches/1.10.x/src/TortoiseProc/RevisionGraph/RevisionGraphDlgFunc.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseProc/RevisionGraph/RevisionGraphDlgFunc.cpp (revision 28248)
@@ -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) 2003-2011, 2013-2015 - TortoiseSVN
3+// Copyright (C) 2003-2011, 2013-2015, 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
@@ -33,6 +33,7 @@
3333 #include "RevisionGraph/StandardLayout.h"
3434 #include "RevisionGraph/ShowWC.h"
3535 #include "RevisionGraph/ShowWCModification.h"
36+#include "DPIAware.h"
3637
3738 #pragma warning(push)
3839 #pragma warning(disable: 4458) // declaration of 'xxx' hides class member
@@ -69,8 +70,8 @@
6970 float origZoom = m_fZoomFactor;
7071
7172 CRect clientRect = GetClientRect();
72- CSize preViewSize (max (REVGRAPH_PREVIEW_WIDTH, clientRect.Width() / 4)
73- ,max (REVGRAPH_PREVIEW_HEIGHT, clientRect.Height() / 4));
73+ CSize preViewSize (max (CDPIAware::Instance().ScaleX(REVGRAPH_PREVIEW_WIDTH), clientRect.Width() / 4)
74+ ,max (CDPIAware::Instance().ScaleY(REVGRAPH_PREVIEW_HEIGHT), clientRect.Height() / 4));
7475
7576 // zoom the graph so that it is completely visible in the window
7677 CRect graphRect = GetGraphRect();
--- branches/1.10.x/src/TortoiseProc/RevisionGraph/StandardNodeSizeAssignment.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseProc/RevisionGraph/StandardNodeSizeAssignment.cpp (revision 28248)
@@ -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) 2003-2010 - TortoiseSVN
3+// Copyright (C) 2003-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
@@ -22,6 +22,7 @@
2222 #include "StandardLayout.h"
2323 #include "VisibleGraphNode.h"
2424 #include "GraphNodeState.h"
25+#include "DPIAware.h"
2526
2627 // construction
2728
@@ -57,13 +58,13 @@
5758 || ( node->previousInBranch->node->GetPath()
5859 != node->node->GetPath());
5960
60- int height = 21;
61+ int height = CDPIAware::Instance().ScaleY(21);
6162 if (node->requiresPath)
6263 {
6364 size_t visibleElementCount = node->node->GetPath().GetDepth()
6465 - node->skipStartPathElements
6566 - node->skipTailPathElements;
66- height += (int)(3 + visibleElementCount * 16);
67+ height += (int)(CDPIAware::Instance().ScaleY(3) + visibleElementCount * 16);
6768 }
6869
6970 // shift (root) nodes down, if their source has been folded
@@ -73,16 +74,16 @@
7374 int shift = (state & ( CGraphNodeStates::COLLAPSED_ABOVE
7475 | CGraphNodeStates::SPLIT_ABOVE)) == 0
7576 ? 0
76- : 6;
77+ : CDPIAware::Instance().ScaleY(6);
7778
7879 int extension = (state & ( CGraphNodeStates::COLLAPSED_BELOW
7980 | CGraphNodeStates::SPLIT_BELOW)) == 0
8081 ? 0
81- : 6;
82+ : CDPIAware::Instance().ScaleY(6);
8283
8384 // set result
8485
85- node->requiredSize = CSize (150, height + extension + shift);
86- node->rect = CRect (0, shift, 150, height + shift);
86+ node->requiredSize = CSize (CDPIAware::Instance().ScaleX(150), height + extension + shift);
87+ node->rect = CRect (0, shift, CDPIAware::Instance().ScaleX(150), height + shift);
8788 }
8889 }
--- branches/1.10.x/src/TortoiseProc/RevisionGraph/RevisionGraphDlg.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseProc/RevisionGraph/RevisionGraphDlg.cpp (revision 28248)
@@ -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) 2003-2017 - TortoiseSVN
3+// Copyright (C) 2003-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
@@ -32,6 +32,7 @@
3232 #include "RepositoryInfo.h"
3333 #include "RevisionInRange.h"
3434 #include "RemovePathsBySubString.h"
35+#include "DPIAware.h"
3536 #include <strsafe.h>
3637
3738 #ifdef _DEBUG
@@ -136,25 +137,43 @@
136137 CBitmap cBitmap;
137138 BITMAP bmBitmap;
138139
140+ // load the toolbar with the dimensions of the bitmap itself
139141 cBitmap.Attach(LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_REVGRAPHBAR),
140142 IMAGE_BITMAP, 0, 0,
141143 LR_DEFAULTSIZE|LR_CREATEDIBSECTION));
142144 cBitmap.GetBitmap(&bmBitmap);
145+ cBitmap.DeleteObject();
146+ // now load the toolbar again, but this time with the dpi-scaled dimensions
147+ // note: we could just load it once and then resize the bitmap, but
148+ // that's not faster. So loading it again is what we do.
149+ cBitmap.Attach(LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_REVGRAPHBAR),
150+ IMAGE_BITMAP,
151+ CDPIAware::Instance().ScaleX(bmBitmap.bmWidth),
152+ CDPIAware::Instance().ScaleY(bmBitmap.bmHeight),
153+ LR_CREATEDIBSECTION));
154+ cBitmap.GetBitmap(&bmBitmap);
143155
156+
144157 CSize cSize(bmBitmap.bmWidth, bmBitmap.bmHeight);
145- int nNbBtn = cSize.cx/20;
158+ int nNbBtn = cSize.cx/ CDPIAware::Instance().ScaleX(20);
146159 RGBTRIPLE * rgb = (RGBTRIPLE*)(bmBitmap.bmBits);
147160 COLORREF rgbMask = RGB(rgb[0].rgbtRed, rgb[0].rgbtGreen, rgb[0].rgbtBlue);
148161
149- cImageList.Create(20, cSize.cy, ILC_COLOR32|ILC_MASK, nNbBtn, 0);
162+ cImageList.Create(CDPIAware::Instance().ScaleX(20), cSize.cy, ILC_COLOR32|ILC_MASK, nNbBtn, 0);
150163 cImageList.Add(&cBitmap, rgbMask);
164+ // set the sizes of the button and images:
165+ // note: buttonX must be 7 pixels more than imageX, and buttonY must be 6 pixels more than imageY.
166+ // See the source of SetSizes().
167+ m_ToolBar.SetSizes(CSize(CDPIAware::Instance().ScaleX(27), CDPIAware::Instance().ScaleY(26)),
168+ CSize(CDPIAware::Instance().ScaleX(20), CDPIAware::Instance().ScaleY(20)));
151169 m_ToolBar.SendMessage(TB_SETIMAGELIST, 0, (LPARAM)cImageList.m_hImageList);
152170 cImageList.Detach();
153171 cBitmap.Detach();
154172 }
173+
155174 RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
156175
157-#define SNAP_WIDTH 60 //the width of the combo box
176+#define SNAP_WIDTH CDPIAware::Instance().ScaleX(60) //the width of the combo box
158177 // set up the ComboBox control as a snap mode select box
159178 // First get the index of the placeholders position in the toolbar
160179 int zoomComboIndex = 0;
@@ -167,8 +186,8 @@
167186 m_ToolBar.GetItemRect(zoomComboIndex, &rect);
168187
169188 // expand the rectangle to allow the combo box room to drop down
170- rect.top+=3;
171- rect.bottom += 200;
189+ rect.top+= CDPIAware::Instance().ScaleY(3);
190+ rect.bottom += CDPIAware::Instance().ScaleY(200);
172191
173192 // then create the combo box and show it
174193 if (!m_ToolBar.m_ZoomCombo.CreateEx(WS_EX_RIGHT, WS_CHILD|WS_VISIBLE|CBS_AUTOHSCROLL|CBS_DROPDOWN,
@@ -422,7 +441,7 @@
422441 float horzfact = (windowRect.Width() - 4.0f)/(4.0f + graphRect.Width());
423442 float vertfact = (windowRect.Height() - 4.0f)/(4.0f + graphRect.Height());
424443 if ((horzfact < vertfact) && (horzfact < MAX_ZOOM))
425- vertfact = (windowRect.Height() - 20.0f)/(4.0f + graphRect.Height());
444+ vertfact = (windowRect.Height() - CDPIAware::Instance().ScaleY(20))/(4.0f + graphRect.Height());
426445
427446 DoZoom (min (MAX_ZOOM, vertfact));
428447 }
@@ -436,7 +455,7 @@
436455 float horzfact = (windowRect.Width() - 4.0f)/(4.0f + graphRect.Width());
437456 float vertfact = (windowRect.Height() - 4.0f)/(4.0f + graphRect.Height());
438457 if ((vertfact < horzfact) && (vertfact < MAX_ZOOM))
439- horzfact = (windowRect.Width() - 20.0f)/(4.0f + graphRect.Width());
458+ horzfact = (windowRect.Width() - CDPIAware::Instance().ScaleX(20))/(4.0f + graphRect.Width());
440459
441460 DoZoom (min (MAX_ZOOM, horzfact));
442461 }
--- branches/1.10.x/src/TortoiseProc/RevisionGraph/RevisionGraphWnd.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseProc/RevisionGraph/RevisionGraphWnd.cpp (revision 28248)
@@ -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) 2003-2017 - TortoiseSVN
3+// Copyright (C) 2003-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
@@ -38,6 +38,7 @@
3838 #include "RevisionGraph/StandardLayout.h"
3939 #include "RevisionGraph/UpsideDownLayout.h"
4040 #include "FormatMessageWrapper.h"
41+#include "DPIAware.h"
4142 #include <strsafe.h>
4243
4344 #ifdef _DEBUG
@@ -253,9 +254,10 @@
253254 // get node at point or node that is close enough
254255 // so that point may hit a glyph area
255256
257+ auto glyphsize = CDPIAware::Instance().ScaleX(GLYPH_SIZE);
256258 index_t nodeIndex = GetHitNode(point);
257259 if (nodeIndex == NO_INDEX)
258- nodeIndex = GetHitNode(point, CSize (GLYPH_SIZE, GLYPH_SIZE / 2));
260+ nodeIndex = GetHitNode(point, CSize (glyphsize, glyphsize / 2));
259261
260262 if (nodeIndex >= nodeList->GetCount())
261263 return 0;
@@ -270,12 +272,12 @@
270272 CRect r = node.rect;
271273 CPoint center = r.CenterPoint();
272274
273- CRect rightGlyphArea ( r.right - GLYPH_SIZE, center.y - GLYPH_SIZE / 2
274- , r.right + GLYPH_SIZE, center.y + GLYPH_SIZE / 2);
275- CRect topGlyphArea ( center.x - GLYPH_SIZE, r.top - GLYPH_SIZE / 2
276- , center.x + GLYPH_SIZE, r.top + GLYPH_SIZE / 2);
277- CRect bottomGlyphArea ( center.x - GLYPH_SIZE, r.bottom - GLYPH_SIZE / 2
278- , center.x + GLYPH_SIZE, r.bottom + GLYPH_SIZE / 2);
275+ CRect rightGlyphArea ( r.right - glyphsize, center.y - glyphsize / 2
276+ , r.right + glyphsize, center.y + glyphsize / 2);
277+ CRect topGlyphArea ( center.x - glyphsize, r.top - glyphsize / 2
278+ , center.x + glyphsize, r.top + glyphsize / 2);
279+ CRect bottomGlyphArea ( center.x - glyphsize, r.bottom - glyphsize / 2
280+ , center.x + glyphsize, r.bottom + glyphsize / 2);
279281
280282 bool upsideDown
281283 = m_state.GetOptions()->GetOption<CUpsideDownLayout>()->IsActive();
@@ -313,7 +315,7 @@
313315
314316 const CRevisionGraphState::SVisibleGlyph* CRevisionGraphWnd::GetHitGlyph (CPoint point) const
315317 {
316- float glyphSize = GLYPH_SIZE * m_fZoomFactor;
318+ float glyphSize = CDPIAware::Instance().ScaleX(GLYPH_SIZE) * m_fZoomFactor;
317319
318320 CSyncPointer<const CRevisionGraphState::TVisibleGlyphs>
319321 visibleGlyphs (m_state.GetVisibleGlyphs());
--- branches/1.10.x/src/TortoiseProc/RevisionGraph/RevisionGraphDlgDraw.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseProc/RevisionGraph/RevisionGraphDlgDraw.cpp (revision 28248)
@@ -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) 2003-2011, 2013-2016 - TortoiseSVN
3+// Copyright (C) 2003-2011, 2013-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
@@ -30,6 +30,7 @@
3030 #include "IRevisionGraphLayout.h"
3131 #include "UpsideDownLayout.h"
3232 #include "ShowTreeStripes.h"
33+#include "DPIAware.h"
3334
3435 #ifdef _DEBUG
3536 #define new DEBUG_NEW
@@ -102,7 +103,7 @@
102103
103104 void CRevisionGraphWnd::ClearVisibleGlyphs (const CRect& rect)
104105 {
105- float glyphSize = GLYPH_SIZE * m_fZoomFactor;
106+ float glyphSize = CDPIAware::Instance().ScaleX(GLYPH_SIZE) * m_fZoomFactor;
106107
107108 CSyncPointer<CRevisionGraphState::TVisibleGlyphs>
108109 visibleGlyphs (m_state.GetVisibleGlyphs());
@@ -139,7 +140,7 @@
139140 {
140141 enum {POINT_COUNT = 8};
141142
142- float radius = CORNER_SIZE * m_fZoomFactor;
143+ float radius = CDPIAware::Instance().ScaleX(CORNER_SIZE) * m_fZoomFactor;
143144 PointF points[POINT_COUNT];
144145 CutawayPoints (rect, radius, points);
145146
@@ -173,7 +174,7 @@
173174
174175 // show left & right edges of low boxes as "<===>"
175176
176- float minCutAway = min (CORNER_SIZE * m_fZoomFactor, rect.Height / 2);
177+ float minCutAway = min (CDPIAware::Instance().ScaleX(CORNER_SIZE) * m_fZoomFactor, rect.Height / 2);
177178
178179 // larger boxes: remove 25% of the shorter side
179180
@@ -425,7 +426,7 @@
425426
426427 // expand it just a little to make it look nicer
427428
428- cover.InflateRect (10, 2, 10, 2);
429+ cover.InflateRect (CDPIAware::Instance().ScaleX(10), CDPIAware::Instance().ScaleY(2), CDPIAware::Instance().ScaleX(10), CDPIAware::Instance().ScaleY(2));
429430
430431 // and now, transfrom it
431432
@@ -483,7 +484,7 @@
483484 , const Color& darkColor
484485 , const Color& penColor)
485486 {
486- float squareSize = MARKER_SIZE * m_fZoomFactor;
487+ float squareSize = CDPIAware::Instance().ScaleX(MARKER_SIZE) * m_fZoomFactor;
487488
488489 PointF leftBottom (leftTop.X, leftTop.Y + squareSize);
489490 RectF square (leftTop, SizeF (squareSize, squareSize));
@@ -519,11 +520,11 @@
519520
520521 // bitmap source area
521522
522- REAL x = ((REAL)position + (REAL)glyph) * GLYPH_BITMAP_SIZE;
523+ REAL x = ((REAL)position + (REAL)glyph) * CDPIAware::Instance().ScaleX(GLYPH_BITMAP_SIZE);
523524
524525 // screen target area
525526
526- float glyphSize = GLYPH_SIZE * m_fZoomFactor;
527+ float glyphSize = CDPIAware::Instance().ScaleX(GLYPH_SIZE) * m_fZoomFactor;
527528 RectF target (leftTop, SizeF (glyphSize, glyphSize));
528529
529530 // scaled copy
@@ -532,7 +533,7 @@
532533 {
533534 graphics.graphics->DrawImage ( glyphs
534535 , target
535- , x, 0.0f, GLYPH_BITMAP_SIZE, GLYPH_BITMAP_SIZE
536+ , x, 0.0f, (REAL)CDPIAware::Instance().ScaleX(GLYPH_BITMAP_SIZE), (REAL)CDPIAware::Instance().ScaleY(GLYPH_BITMAP_SIZE)
536537 , UnitPixel, NULL, NULL, NULL);
537538 }
538539 else if (graphics.pSVG)
@@ -588,7 +589,7 @@
588589 CSyncPointer<CRevisionGraphState::TVisibleGlyphs>
589590 visibleGlyphs (m_state.GetVisibleGlyphs());
590591
591- float squareSize = GLYPH_SIZE * m_fZoomFactor;
592+ float squareSize = CDPIAware::Instance().ScaleX(GLYPH_SIZE) * m_fZoomFactor;
592593 if (glyph2 == NoGlyph)
593594 {
594595 PointF leftTop (center.X - 0.5f * squareSize, center.Y - 0.5f * squareSize);
@@ -754,7 +755,7 @@
754755 , int colorIndex )
755756 {
756757 // marker size
757- float squareSize = MARKER_SIZE * m_fZoomFactor;
758+ float squareSize = CDPIAware::Instance().ScaleX(MARKER_SIZE) * m_fZoomFactor;
758759 float squareDist = min ( (noderect.Height - squareSize) / 2
759760 , squareSize / 2);
760761
@@ -1016,7 +1017,7 @@
10161017 if ((m_hoverIndex != NO_INDEX) || (m_hoverGlyphs != 0))
10171018 {
10181019 index_t nodeIndex = m_hoverIndex == NO_INDEX
1019- ? GetHitNode (point, CSize (GLYPH_SIZE, GLYPH_SIZE / 2))
1020+ ? GetHitNode (point, CSize (CDPIAware::Instance().ScaleX(GLYPH_SIZE), CDPIAware::Instance().ScaleY(GLYPH_SIZE) / 2))
10201021 : m_hoverIndex;
10211022
10221023 if (nodeIndex >= nodeList->GetCount())
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
--- branches/1.10.x/src/TortoiseProc/AboutDlg.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseProc/AboutDlg.cpp (revision 28248)
@@ -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) 2003-2014, 2016-2017 - TortoiseSVN
3+// Copyright (C) 2003-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
@@ -26,6 +26,7 @@
2626 #include "../../ext/sqlite/sqlite3.h"
2727 #include "../../ext/openssl/include/openssl/opensslv.h"
2828 #include "AppUtils.h"
29+#include "../Utils/DPIAware.h"
2930
3031 IMPLEMENT_DYNAMIC(CAboutDlg, CStandAloneDialog)
3132 CAboutDlg::CAboutDlg(CWnd* pParent /*=NULL*/)
@@ -90,10 +91,10 @@
9091
9192 CPictureHolder tmpPic;
9293 tmpPic.CreateFromBitmap(IDB_LOGOFLIPPED);
93- m_renderSrc.Create32BitFromPicture(&tmpPic,468,64);
94- m_renderDest.Create32BitFromPicture(&tmpPic,468,64);
94+ m_renderSrc.Create32BitFromPicture(&tmpPic, CDPIAware::Instance().ScaleX(468), CDPIAware::Instance().ScaleY(64));
95+ m_renderDest.Create32BitFromPicture(&tmpPic, CDPIAware::Instance().ScaleX(468), CDPIAware::Instance().ScaleY(64));
9596
96- m_waterEffect.Create(468,64);
97+ m_waterEffect.Create(CDPIAware::Instance().ScaleX(468), CDPIAware::Instance().ScaleY(64));
9798 SetTimer(ID_EFFECTTIMER, 40, NULL);
9899 SetTimer(ID_DROPTIMER, 1500, NULL);
99100
@@ -111,14 +112,14 @@
111112 {
112113 m_waterEffect.Render((DWORD*)m_renderSrc.GetDIBits(), (DWORD*)m_renderDest.GetDIBits());
113114 CClientDC dc(this);
114- CPoint ptOrigin(15,20);
115+ CPoint ptOrigin(CDPIAware::Instance().ScaleX(15), CDPIAware::Instance().ScaleY(20));
115116 m_renderDest.Draw(&dc,ptOrigin);
116117 }
117118 if (nIDEvent == ID_DROPTIMER)
118119 {
119120 CRect r;
120- r.left = 15;
121- r.top = 20;
121+ r.left = CDPIAware::Instance().ScaleX(15);
122+ r.top = CDPIAware::Instance().ScaleY(20);
122123 r.right = r.left + m_renderSrc.GetWidth();
123124 r.bottom = r.top + m_renderSrc.GetHeight();
124125 m_waterEffect.Blob(random(r.left,r.right), random(r.top, r.bottom), 5, 800, m_waterEffect.m_iHpage);
@@ -128,9 +129,11 @@
128129
129130 void CAboutDlg::OnMouseMove(UINT nFlags, CPoint point)
130131 {
132+ auto dpix15 = CDPIAware::Instance().ScaleX(15);
133+ auto dpiy20 = CDPIAware::Instance().ScaleY(20);
131134 CRect r;
132- r.left = 15;
133- r.top = 20;
135+ r.left = dpix15;
136+ r.top = dpiy20;
134137 r.right = r.left + m_renderSrc.GetWidth();
135138 r.bottom = r.top + m_renderSrc.GetHeight();
136139
@@ -137,13 +140,13 @@
137140 if(r.PtInRect(point) == TRUE)
138141 {
139142 // dibs are drawn upside down...
140- point.y -= 20;
141- point.y = 64-point.y;
143+ point.y -= dpiy20;
144+ point.y = CDPIAware::Instance().ScaleY(64) -point.y;
142145
143146 if (nFlags & MK_LBUTTON)
144- m_waterEffect.Blob(point.x -15,point.y,10,1600,m_waterEffect.m_iHpage);
147+ m_waterEffect.Blob(point.x - dpix15,point.y, CDPIAware::Instance().ScaleX(10),1600,m_waterEffect.m_iHpage);
145148 else
146- m_waterEffect.Blob(point.x -15,point.y,5,50,m_waterEffect.m_iHpage);
149+ m_waterEffect.Blob(point.x - dpix15,point.y, CDPIAware::Instance().ScaleX(5),50,m_waterEffect.m_iHpage);
147150
148151 }
149152
--- branches/1.10.x/src/TortoiseProc/SVNProgressDlg.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseProc/SVNProgressDlg.cpp (revision 28248)
@@ -465,6 +465,14 @@
465465 bNoNotify = true;
466466 break;
467467 }
468+ else
469+ {
470+ if (url.IsEmpty())
471+ {
472+ data->url = CTSVNPath(GetURLFromPath(path));
473+ data->sPathColumnText.FormatMessage(IDS_PROGRS_UPDATE, data->path.GetWinPath(), (LPCWSTR)data->url.GetSVNPathString());
474+ }
475+ }
468476 data->sActionColumnText.LoadString(IDS_SVNACTION_UPDATING);
469477 m_basePath = path;
470478 m_bConflictWarningShown = false;
@@ -3802,9 +3810,7 @@
38023810 }
38033811 }
38043812 }
3805- CString sCmdInfo;
3806- sCmdInfo.FormatMessage(IDS_PROGRS_CMD_UPDATE, (LPCWSTR)GetURLFromPath(m_targetPathList.GetCommonRoot()));
3807- ReportCmd(sCmdInfo);
3813+ ReportCmd(CString(MAKEINTRESOURCE(IDS_PROGRS_CMD_UPDATE)));
38083814 CBlockCacheForPath cacheBlock (m_targetPathList[0].GetWinPath());
38093815 if (!Update(m_targetPathList, m_Revision, m_depth, (m_options & ProgOptStickyDepth) != 0, (m_options & ProgOptIgnoreExternals) != 0, !!DWORD(CRegDWORD(L"Software\\TortoiseSVN\\AllowUnversionedObstruction", true)), true))
38103816 {
--- branches/1.10.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28248)
@@ -7233,7 +7233,10 @@
72337233 OnOutOfScope(CoUninitialize());
72347234 this->EnableWindow(FALSE);
72357235 OnOutOfScope(this->EnableWindow(TRUE); this->SetFocus());
7236- DiffSelectedFile(ignoreprops);
7236+ if (pCmi->ChangedLogPathIndices.size() > 1)
7237+ DoDiffFromLog(selIndex, pCmi->Rev1, pCmi->Rev1, false, false, ignoreprops);
7238+ else
7239+ DiffSelectedFile(ignoreprops);
72377240 };
72387241 new async::CAsyncCall(f, &netScheduler);
72397242 }
--- branches/1.10.x/src/Utils/MiscUI/LinkControl.cpp (revision 28247)
+++ branches/1.10.x/src/Utils/MiscUI/LinkControl.cpp (revision 28248)
@@ -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) 2009, 2012-2016 - TortoiseSVN
3+// Copyright (C) 2009, 2012-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
@@ -52,19 +52,18 @@
5252 }
5353
5454 // Create an updated font by adding an underline.
55+ LOGFONT lf;
5556 CFont* pFont = GetFont();
56- if (!pFont)
57+ if (pFont)
58+ pFont->GetObject(sizeof(lf), &lf);
59+ else
5760 {
58- HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
59- if (hFont == NULL)
60- hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
61- if (hFont)
62- pFont = CFont::FromHandle(hFont);
61+ NONCLIENTMETRICS metrics = { 0 };
62+ metrics.cbSize = sizeof(NONCLIENTMETRICS);
63+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, FALSE);
64+ memcpy_s(&lf, sizeof(LOGFONT), &metrics.lfMessageFont, sizeof(LOGFONT));
6365 }
64- ASSERT(pFont->GetSafeHandle());
6566
66- LOGFONT lf;
67- pFont->GetObject(sizeof(lf), &lf);
6867 lf.lfWeight = FW_BOLD;
6968 m_NormalFont.CreateFontIndirect(&lf);
7069
--- branches/1.10.x/src/Utils/MiscUI/HintCtrl.h (revision 28247)
+++ branches/1.10.x/src/Utils/MiscUI/HintCtrl.h (revision 28248)
@@ -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) 2011, 2013, 2015, 2017 - TortoiseSVN
3+// Copyright (C) 2011, 2013, 2015, 2017-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
@@ -28,8 +28,18 @@
2828 template <typename BaseType> class CHintCtrl : public BaseType
2929 {
3030 public:
31- CHintCtrl() : BaseType() {}
32- ~CHintCtrl() {}
31+ CHintCtrl() : BaseType(), m_uiFont(0)
32+ {
33+ NONCLIENTMETRICS metrics = { 0 };
34+ metrics.cbSize = sizeof(NONCLIENTMETRICS);
35+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, FALSE);
36+ m_uiFont = CreateFontIndirect(&metrics.lfMessageFont);
37+ }
38+ virtual ~CHintCtrl()
39+ {
40+ if (m_uiFont)
41+ DeleteObject(m_uiFont);
42+ }
3343
3444 virtual ULONG GetGestureStatus(CPoint /*ptTouch*/) override
3545 {
@@ -96,7 +106,7 @@
96106 else
97107 memDC.FillSolidRect(rc, clrTextBk);
98108 rc.top += 10;
99- CGdiObject * oldfont = memDC.SelectStockObject(DEFAULT_GUI_FONT);
109+ CGdiObject * oldfont = memDC.SelectObject(CGdiObject::FromHandle(m_uiFont));
100110 memDC.DrawText(m_sText, rc, DT_CENTER | DT_VCENTER |
101111 DT_WORDBREAK | DT_NOPREFIX | DT_NOCLIP);
102112 memDC.SelectObject(oldfont);
@@ -117,6 +127,7 @@
117127
118128 private:
119129 CString m_sText;
130+ HFONT m_uiFont;
120131 };
121132
122133 BEGIN_TEMPLATE_MESSAGE_MAP(CHintCtrl, BaseType, BaseType)
--- branches/1.10.x/src/Utils/MiscUI/HyperLink.cpp (revision 28247)
+++ branches/1.10.x/src/Utils/MiscUI/HyperLink.cpp (revision 28248)
@@ -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) 2003-2006, 2008, 2011-2012, 2014 - TortoiseSVN
3+// Copyright (C) 2003-2006, 2008, 2011-2012, 2014, 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
@@ -77,19 +77,18 @@
7777 SetWindowText(m_strURL);
7878 }
7979
80+ LOGFONT lf;
8081 CFont* pFont = GetFont();
81- if (!pFont)
82+ if (pFont)
83+ pFont->GetObject(sizeof(lf), &lf);
84+ else
8285 {
83- HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
84- if (hFont == NULL)
85- hFont = (HFONT) GetStockObject(ANSI_VAR_FONT);
86- if (hFont)
87- pFont = CFont::FromHandle(hFont);
86+ NONCLIENTMETRICS metrics = { 0 };
87+ metrics.cbSize = sizeof(NONCLIENTMETRICS);
88+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, FALSE);
89+ memcpy_s(&lf, sizeof(LOGFONT), &metrics.lfMessageFont, sizeof(LOGFONT));
8890 }
89- ASSERT(pFont->GetSafeHandle());
9091
91- LOGFONT lf;
92- pFont->GetLogFont(&lf);
9392 m_StdFont.CreateFontIndirect(&lf);
9493 lf.lfUnderline = (BYTE) TRUE;
9594 m_UnderlineFont.CreateFontIndirect(&lf);
--- branches/1.10.x/src/Changelog.txt (revision 28247)
+++ branches/1.10.x/src/Changelog.txt (revision 28248)
@@ -15,6 +15,9 @@
1515 - BUG: Wrong behavior for 'lock' error. (Patrick Steinhardt)
1616 - CHG: Improved labels and text in dialog when
1717 creating a copy in repo browser. (Stefan)
18+- BUG: When showing multiple diffs from the log
19+ dialog with added files, only the first
20+ one was shown multiple times. (Stefan)
1821
1922 Version 1.10.0
2023 See the release notes here:
--- branches/1.10.x/src/SVN/SVNStatusListCtrl.h (revision 28247)
+++ branches/1.10.x/src/SVN/SVNStatusListCtrl.h (revision 28248)
@@ -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) 2003-2015, 2017 - TortoiseSVN
3+// Copyright (C) 2003-2015, 2017-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
@@ -1136,6 +1136,8 @@
11361136 HMENU m_hShellMenu;
11371137 LPCONTEXTMENU m_pContextMenu;
11381138
1139+ HFONT m_uiFont;
1140+
11391141 friend class CSVNStatusListCtrlDropTarget;
11401142 };
11411143
--- branches/1.10.x/src/SVN/SVNStatusListCtrl.cpp (revision 28247)
+++ branches/1.10.x/src/SVN/SVNStatusListCtrl.cpp (revision 28248)
@@ -367,12 +367,19 @@
367367 , m_bAllowPeggedExternals(false)
368368 , m_pContextMenu(nullptr)
369369 , m_hShellMenu(0)
370+ , m_uiFont(0)
370371 {
371372 m_tooltipbuf[0] = 0;
373+ NONCLIENTMETRICS metrics = { 0 };
374+ metrics.cbSize = sizeof(NONCLIENTMETRICS);
375+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, FALSE);
376+ m_uiFont = CreateFontIndirect(&metrics.lfMessageFont);
372377 }
373378
374379 CSVNStatusListCtrl::~CSVNStatusListCtrl()
375380 {
381+ if (m_uiFont)
382+ DeleteObject(m_uiFont);
376383 ClearStatusArray();
377384 }
378385
@@ -5426,7 +5433,7 @@
54265433 memDC.SetBkColor(clrTextBk);
54275434 memDC.BitBlt(rc.left, rc.top, rc.Width(), rc.Height(), pDC, rc.left, rc.top, SRCCOPY);
54285435 rc.top += 10;
5429- CGdiObject * oldfont = memDC.SelectStockObject(DEFAULT_GUI_FONT);
5436+ CGdiObject * oldfont = memDC.SelectObject(CGdiObject::FromHandle(m_uiFont));
54305437 memDC.DrawText(str, rc, DT_CENTER | DT_VCENTER |
54315438 DT_WORDBREAK | DT_NOPREFIX | DT_NOCLIP);
54325439 memDC.SelectObject(oldfont);
--- branches/1.10.x/src/TortoiseBlame/TortoiseBlame.cpp (revision 28247)
+++ branches/1.10.x/src/TortoiseBlame/TortoiseBlame.cpp (revision 28248)
@@ -28,6 +28,7 @@
2828 #include "BlameIndexColors.h"
2929 #include "../Utils/CrashReport.h"
3030 #include "../Utils/DebugOutput.h"
31+#include "../Utils/DPIAware.h"
3132
3233 #include <algorithm>
3334 #include <cctype>
@@ -86,6 +87,7 @@
8687 , m_ttVisible(false)
8788 , m_font(0)
8889 , m_italicFont(0)
90+ , m_uiFont(0)
8991 , m_blameWidth(0)
9092 , m_revWidth(0)
9193 , m_dateWidth(0)
@@ -127,6 +129,11 @@
127129 m_selectedRevColor = GetSysColor(COLOR_HIGHLIGHT);
128130 m_selectedAuthorColor = InterColor(m_selectedRevColor, m_textHighLightColor, 35);
129131 SecureZeroMemory(&m_fr, sizeof(m_fr));
132+
133+ NONCLIENTMETRICS metrics = { 0 };
134+ metrics.cbSize = sizeof(NONCLIENTMETRICS);
135+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, FALSE);
136+ m_uiFont = CreateFontIndirect(&metrics.lfMessageFont);
130137 }
131138
132139 TortoiseBlame::~TortoiseBlame()
@@ -135,6 +142,8 @@
135142 DeleteObject(m_font);
136143 if (m_italicFont)
137144 DeleteObject(m_italicFont);
145+ if (m_uiFont)
146+ DeleteObject(m_uiFont);
138147 }
139148
140149 std::wstring TortoiseBlame::GetAppDirectory()
@@ -1371,13 +1380,13 @@
13711380 TCHAR buf[MAX_PATH] = { 0 };
13721381 swprintf_s(buf, L"*%8d ", 88888888);
13731382 ::GetTextExtentPoint(hDC, buf, (int)wcslen(buf), &width);
1374- m_revWidth = width.cx + BLAMESPACE;
1383+ m_revWidth = width.cx + CDPIAware::Instance().ScaleX(BLAMESPACE);
13751384 blamewidth += m_revWidth;
13761385 if (ShowDate)
13771386 {
13781387 swprintf_s(buf, L"%30s", L"31.08.2001 06:24:14");
13791388 ::GetTextExtentPoint32(hDC, buf, (int)wcslen(buf), &width);
1380- m_dateWidth = width.cx + BLAMESPACE;
1389+ m_dateWidth = width.cx + CDPIAware::Instance().ScaleX(BLAMESPACE);
13811390 blamewidth += m_dateWidth;
13821391 }
13831392 if (ShowAuthor)
@@ -1389,7 +1398,7 @@
13891398 if (width.cx > maxwidth.cx)
13901399 maxwidth = width;
13911400 }
1392- m_authorWidth = maxwidth.cx + BLAMESPACE;
1401+ m_authorWidth = maxwidth.cx + CDPIAware::Instance().ScaleX(BLAMESPACE);
13931402 blamewidth += m_authorWidth;
13941403 }
13951404 if (ShowPath)
@@ -1401,7 +1410,7 @@
14011410 if (width.cx > maxwidth.cx)
14021411 maxwidth = width;
14031412 }
1404- m_pathWidth = maxwidth.cx + BLAMESPACE;
1413+ m_pathWidth = maxwidth.cx + CDPIAware::Instance().ScaleX(BLAMESPACE);
14051414 blamewidth += m_pathWidth;
14061415 }
14071416 ::SelectObject(hDC, oldfont);
@@ -1548,12 +1557,12 @@
15481557 return;
15491558
15501559 RECT rc;
1551- HFONT oldfont = (HFONT)::SelectObject(hDC, GetStockObject(DEFAULT_GUI_FONT));
1560+ HFONT oldfont = (HFONT)::SelectObject(hDC, m_uiFont);
15521561 GetClientRect(wHeader, &rc);
15531562 ::SetBkColor(hDC, ::GetSysColor(COLOR_BTNFACE));
15541563
15551564 RECT edgerc = rc;
1556- edgerc.bottom = edgerc.top + HEADER_HEIGHT/2;
1565+ edgerc.bottom = edgerc.top + CDPIAware::Instance().ScaleY(HEADER_HEIGHT) /2;
15571566 DrawEdge(hDC, &edgerc, EDGE_BUMP, BF_FLAT|BF_RECT|BF_ADJUST);
15581567
15591568 // draw the path first
@@ -1567,16 +1576,16 @@
15671576 if (str2.size() >= MAX_PATH)
15681577 str2 = str2.substr(0, MAX_PATH-2);
15691578 wcscpy_s(pathbuf, str2.c_str());
1570- PathCompactPath(hDC, pathbuf, edgerc.right-edgerc.left-LOCATOR_WIDTH);
1579+ PathCompactPath(hDC, pathbuf, edgerc.right-edgerc.left- CDPIAware::Instance().ScaleX(LOCATOR_WIDTH));
15711580 }
15721581 else
15731582 {
15741583 wcscpy_s(pathbuf, szViewtitle.c_str());
1575- PathCompactPath(hDC, pathbuf, edgerc.right-edgerc.left-LOCATOR_WIDTH);
1584+ PathCompactPath(hDC, pathbuf, edgerc.right-edgerc.left- CDPIAware::Instance().ScaleX(LOCATOR_WIDTH));
15761585 }
15771586 DrawText(hDC, pathbuf, -1, &edgerc, DT_SINGLELINE|DT_VCENTER);
15781587
1579- rc.top = rc.top + HEADER_HEIGHT/2;
1588+ rc.top = rc.top + CDPIAware::Instance().ScaleY(HEADER_HEIGHT)/2;
15801589 DrawEdge(hDC, &rc, EDGE_BUMP, BF_FLAT|BF_RECT|BF_ADJUST);
15811590
15821591 RECT drawRc = rc;
@@ -1583,9 +1592,9 @@
15831592
15841593 TCHAR szText[MAX_LOADSTRING] = { 0 };
15851594 LoadString(app.hResource, IDS_HEADER_REVISION, szText, MAX_LOADSTRING);
1586- drawRc.left = LOCATOR_WIDTH;
1595+ drawRc.left = CDPIAware::Instance().ScaleX(LOCATOR_WIDTH);
15871596 DrawText(hDC, szText, -1, &drawRc, DT_SINGLELINE|DT_VCENTER);
1588- int Left = m_revWidth+LOCATOR_WIDTH;
1597+ int Left = m_revWidth+ CDPIAware::Instance().ScaleX(LOCATOR_WIDTH);
15891598 if (ShowDate)
15901599 {
15911600 LoadString(app.hResource, IDS_HEADER_DATE, szText, MAX_LOADSTRING);
@@ -2029,8 +2038,8 @@
20292038 RECT blamerc;
20302039 RECT sourcerc;
20312040 ::GetClientRect(wMain, &rc);
2032- ::SetWindowPos(wHeader, 0, rc.left, rc.top, rc.right-rc.left, HEADER_HEIGHT, 0);
2033- rc.top += HEADER_HEIGHT;
2041+ ::SetWindowPos(wHeader, 0, rc.left, rc.top, rc.right-rc.left, CDPIAware::Instance().ScaleY(HEADER_HEIGHT), 0);
2042+ rc.top += CDPIAware::Instance().ScaleY(HEADER_HEIGHT);
20342043 blamerc.left = rc.left;
20352044 blamerc.top = rc.top;
20362045 LONG w = GetBlameWidth();
@@ -2042,15 +2051,15 @@
20422051 sourcerc.right = rc.right;
20432052 if (m_colorby != COLORBYNONE)
20442053 {
2045- ::OffsetRect(&blamerc, LOCATOR_WIDTH, 0);
2046- ::OffsetRect(&sourcerc, LOCATOR_WIDTH, 0);
2047- sourcerc.right -= LOCATOR_WIDTH;
2054+ ::OffsetRect(&blamerc, CDPIAware::Instance().ScaleX(LOCATOR_WIDTH), 0);
2055+ ::OffsetRect(&sourcerc, CDPIAware::Instance().ScaleX(LOCATOR_WIDTH), 0);
2056+ sourcerc.right -= CDPIAware::Instance().ScaleX(LOCATOR_WIDTH);
20482057 }
20492058 InvalidateRect(wMain, NULL, FALSE);
20502059 ::SetWindowPos(wEditor, 0, sourcerc.left, sourcerc.top, sourcerc.right - sourcerc.left, sourcerc.bottom - sourcerc.top, 0);
20512060 ::SetWindowPos(wBlame, 0, blamerc.left, blamerc.top, blamerc.right - blamerc.left, blamerc.bottom - blamerc.top, 0);
20522061 if (m_colorby != COLORBYNONE)
2053- ::SetWindowPos(wLocator, 0, 0, blamerc.top, LOCATOR_WIDTH, blamerc.bottom - blamerc.top, SWP_SHOWWINDOW);
2062+ ::SetWindowPos(wLocator, 0, 0, blamerc.top, CDPIAware::Instance().ScaleX(LOCATOR_WIDTH), blamerc.bottom - blamerc.top, SWP_SHOWWINDOW);
20542063 else
20552064 ::ShowWindow(wLocator, SW_HIDE);
20562065 }
--- branches/1.10.x/src/TortoiseBlame/TortoiseBlame.h (revision 28247)
+++ branches/1.10.x/src/TortoiseBlame/TortoiseBlame.h (revision 28248)
@@ -150,6 +150,7 @@
150150 //std::vector<COLORREF> m_colors;
151151 HFONT m_font;
152152 HFONT m_italicFont;
153+ HFONT m_uiFont;
153154 LONG m_blameWidth;
154155 LONG m_revWidth;
155156 LONG m_dateWidth;
Show on old repository browser