diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-05-05 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:55 +0300 |
commit | 3901bf0ab88106a5b031cba7bc18d60cdebf7eef (patch) | |
tree | 808a2489abed822223b118b64e0553db80af6087 /CPP/7zip/UI/FileManager/FM.cpp | |
parent | bd1fa36322ac27f5715433b388742893d6524516 (diff) |
4.58 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/FM.cpp')
-rwxr-xr-x | CPP/7zip/UI/FileManager/FM.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/CPP/7zip/UI/FileManager/FM.cpp b/CPP/7zip/UI/FileManager/FM.cpp index b9a51193..66e5a086 100755 --- a/CPP/7zip/UI/FileManager/FM.cpp +++ b/CPP/7zip/UI/FileManager/FM.cpp @@ -766,38 +766,40 @@ void OnSize(HWND hWnd) MoveSubWindows(hWnd); } +int Window_GetRealHeight(NWindows::CWindow &w) +{ + RECT rect; + WINDOWPLACEMENT placement; + w.GetWindowRect(&rect); + int res = rect.bottom - rect.top; + if (w.GetPlacement(&placement)) + res += placement.rcNormalPosition.top; + return res; +} + void MoveSubWindows(HWND hWnd) { RECT rect; ::GetClientRect(hWnd, &rect); int xSize = rect.right; - int kHeaderSize = 0; - int ySize = MyMax(int(rect.bottom - kHeaderSize), 0); + int headerSize = 0; if (g_App._rebar) - { - RECT barRect; - g_App._rebar.GetWindowRect(&barRect); - kHeaderSize = barRect.bottom - barRect.top; - ySize = MyMax(int(rect.bottom - kHeaderSize), 0); - } + headerSize = Window_GetRealHeight(g_App._rebar); + int ySize = MyMax((int)(rect.bottom - headerSize), 0); - // g_App._headerToolBar.Move(0, 2, xSize, kHeaderSize - 2); - RECT rect2 = rect; - rect2.bottom = 0; - // g_App._headerReBar.SizeToRect(&rect2); if (g_App.NumPanels > 1) { - g_App.Panels[0].Move(0, kHeaderSize, g_Splitter.GetPos(), ySize); + g_App.Panels[0].Move(0, headerSize, g_Splitter.GetPos(), ySize); int xWidth1 = g_Splitter.GetPos() + kSplitterWidth; - g_App.Panels[1].Move(xWidth1, kHeaderSize, xSize - xWidth1, ySize); + g_App.Panels[1].Move(xWidth1, headerSize, xSize - xWidth1, ySize); } else { /* int otherPanel = 1 - g_App.LastFocusedPanel; if (g_App.PanelsCreated[otherPanel]) - g_App.Panels[otherPanel].Move(0, kHeaderSize, 0, ySize); + g_App.Panels[otherPanel].Move(0, headerSize, 0, ySize); */ - g_App.Panels[g_App.LastFocusedPanel].Move(0, kHeaderSize, xSize, ySize); + g_App.Panels[g_App.LastFocusedPanel].Move(0, headerSize, xSize, ySize); } } |