• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28291 (tree)
Time2018-07-14 02:56:16
Authorstefankueng

Log Message

Merged revision(s) r28290 from trunk:
* When resizing the log dialog, automatically adjust the splitters so the resizing can succeed.

Change Summary

Incremental Difference

--- branches/1.10.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28290)
+++ branches/1.10.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28291)
@@ -4024,7 +4024,6 @@
40244024
40254025 AddMainAnchors();
40264026 ArrangeLayout();
4027- AdjustMinSize();
40284027 SetSplitterRange();
40294028 m_LogList.Invalidate();
40304029 m_ChangedFileListCtrl.Invalidate();
@@ -4056,7 +4055,6 @@
40564055
40574056 AddMainAnchors();
40584057 ArrangeLayout();
4059- AdjustMinSize();
40604058 SetSplitterRange();
40614059 GetDlgItem(IDC_MSGVIEW)->Invalidate();
40624060 m_ChangedFileListCtrl.Invalidate();
@@ -4080,7 +4078,6 @@
40804078
40814079 AddMainAnchors();
40824080 ArrangeLayout();
4083- AdjustMinSize();
40844081 SetSplitterRange();
40854082 GetDlgItem(IDC_MSGVIEW)->Invalidate();
40864083 m_LogList.Invalidate();
@@ -4088,22 +4085,6 @@
40884085 m_cFilter.Redraw();
40894086 }
40904087
4091-void CLogDlg::AdjustMinSize()
4092-{
4093- // adjust the minimum size of the dialog to prevent the resizing from
4094- // moving the list control too far down.
4095- CRect rcChgListView;
4096- m_ChangedFileListCtrl.GetClientRect(rcChgListView);
4097- CRect rcLogList;
4098- m_LogList.GetClientRect(rcLogList);
4099- CRect rcLogMsg;
4100- GetDlgItem(IDC_MSGVIEW)->GetClientRect(rcLogMsg);
4101-
4102- SetMinTrackSize(CSize(m_DlgOrigRect.Width(),
4103- m_DlgOrigRect.Height()-m_ChgOrigRect.Height()-m_LogListOrigRect.Height()-m_MsgViewOrigRect.Height()
4104- +rcLogMsg.Height()+abs(rcChgListView.Height()-rcLogList.Height())+60));
4105-}
4106-
41074088 LRESULT CLogDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
41084089 {
41094090 switch (message) {
@@ -6333,7 +6314,53 @@
63336314 {
63346315 __super::OnSize(nType, cx, cy);
63356316 //set range
6336- SetSplitterRange();
6317+ if ((m_LogList) && (m_ChangedFileListCtrl))
6318+ {
6319+ CRect rcTop;
6320+ m_LogList.GetWindowRect(rcTop);
6321+ ScreenToClient(rcTop);
6322+
6323+ CRect rcMiddle;
6324+ GetDlgItem(IDC_MSGVIEW)->GetWindowRect(rcMiddle);
6325+ ScreenToClient(rcMiddle);
6326+
6327+ CRect rcBottom;
6328+ m_ChangedFileListCtrl.GetWindowRect(rcBottom);
6329+ ScreenToClient(rcBottom);
6330+
6331+ if (rcMiddle.Height() < 100)
6332+ {
6333+ CRect rc;
6334+ m_wndSplitter2.GetWindowRect(&rc);
6335+ ScreenToClient(rc);
6336+ rc.MoveToY(rc.top + 20);
6337+ m_wndSplitter2.MoveWindow(&rc);
6338+ DoSizeV2(20);
6339+ }
6340+
6341+ if (rcTop.Height() < 100)
6342+ {
6343+ CRect rc;
6344+ m_wndSplitter1.GetWindowRect(&rc);
6345+ ScreenToClient(rc);
6346+ rc.MoveToY(rc.top + 20);
6347+ m_wndSplitter1.MoveWindow(&rc);
6348+ DoSizeV1(20);
6349+ }
6350+
6351+ m_LogList.GetWindowRect(rcTop);
6352+ ScreenToClient(rcTop);
6353+
6354+ GetDlgItem(IDC_MSGVIEW)->GetWindowRect(rcMiddle);
6355+ ScreenToClient(rcMiddle);
6356+
6357+ m_ChangedFileListCtrl.GetWindowRect(rcBottom);
6358+ ScreenToClient(rcBottom);
6359+
6360+ m_wndSplitter1.SetRange(rcTop.top + 20, rcBottom.bottom - 50);
6361+ m_wndSplitter2.SetRange(rcTop.top + 50, rcBottom.bottom - 20);
6362+ m_wndSplitterLeft.SetRange(80, rcTop.right - m_LogListOrigRect.Width());
6363+ }
63376364 }
63386365
63396366 void CLogDlg::OnRefresh()
--- branches/1.10.x/src/TortoiseProc/LogDialog/LogDlg.h (revision 28290)
+++ branches/1.10.x/src/TortoiseProc/LogDialog/LogDlg.h (revision 28291)
@@ -1,6 +1,6 @@
11 // 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
@@ -260,7 +260,6 @@
260260 void EditLogMessage(size_t index);
261261 void DoSizeV1(int delta);
262262 void DoSizeV2(int delta);
263- void AdjustMinSize();
264263 void SetSplitterRange();
265264 void SetFilterCueText();
266265 void CopySelectionToClipBoard();
Show on old repository browser