Author: gadamopoulos Date: Sat Jul 22 09:13:33 2017 New Revision: 75386
URL: http://svn.reactos.org/svn/reactos?rev=75386&view=rev Log: [EXPLORER] -Implement the minimum taskbar size for the vertical position.
Modified: trunk/reactos/base/shell/explorer/taskband.cpp trunk/reactos/base/shell/explorer/traywnd.cpp
Modified: trunk/reactos/base/shell/explorer/taskband.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskban... ============================================================================== --- trunk/reactos/base/shell/explorer/taskband.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/taskband.cpp [iso-8859-1] Sat Jul 22 09:13:33 2017 @@ -40,15 +40,11 @@ CComPtr<IUnknown> m_Site;
HWND m_hWnd; - HWND m_hWndStartButton; - DWORD m_BandID;
public: CTaskBand() : - m_hWnd(NULL), - m_BandID(0) - { - + m_hWnd(NULL) + { }
virtual ~CTaskBand() { } @@ -117,32 +113,30 @@ /* FIXME: What about DBIMF_NOGRIPPER and DBIMF_ALWAYSGRIPPER */ pdbi->dwModeFlags = DBIMF_VARIABLEHEIGHT;
+ /* Obtain the button size, to be used as the minimum size */ + DWORD size = SendMessageW(hwndToolbar, TB_GETBUTTONSIZE, 0, 0); + pdbi->ptMinSize.x = 0; + pdbi->ptMinSize.y = GET_Y_LPARAM(size); + if (dwViewMode & DBIF_VIEWMODE_VERTICAL) { + pdbi->ptIntegral.x = 0; pdbi->ptIntegral.y = 1; - pdbi->ptMinSize.y = 1; - /* FIXME: Get the button metrics from the task bar object!!! */ - pdbi->ptMinSize.x = (3 * GetSystemMetrics(SM_CXEDGE) / 2) + /* FIXME: Might be wrong if only one column! */ - GetSystemMetrics(SM_CXSIZE) + (2 * GetSystemMetrics(SM_CXEDGE)); /* FIXME: Min button size, query!!! */ } else { - /* Obtain the button size, to be used as the integral size */ - DWORD size = SendMessageW(hwndToolbar, TB_GETBUTTONSIZE, 0, 0); pdbi->ptIntegral.x = 0; pdbi->ptIntegral.y = GET_Y_LPARAM(size); - pdbi->ptMinSize = pdbi->ptIntegral; }
/* Ignored: pdbi->ptMaxSize.x */ pdbi->ptMaxSize.y = -1;
+ RECT rcToolbar; + ::GetWindowRect(hwndToolbar, &rcToolbar); /* FIXME: We should query the height from the task bar object!!! */ - pdbi->ptActual.y = GetSystemMetrics(SM_CYSIZE) + (2 * GetSystemMetrics(SM_CYEDGE)); - - /* Save the band ID for future use in case we need to check whether a given band - is the task band */ - m_BandID = dwBandID; + pdbi->ptActual.x = rcToolbar.right - rcToolbar.left; + pdbi->ptActual.y = rcToolbar.bottom - rcToolbar.top;
TRACE("H: %d, Min: %d,%d, Integral.y: %d Actual: %d,%d\n", (dwViewMode & DBIF_VIEWMODE_VERTICAL) == 0, pdbi->ptMinSize.x, pdbi->ptMinSize.y, pdbi->ptIntegral.y, @@ -334,8 +328,6 @@ HRESULT STDMETHODCALLTYPE Initialize(IN OUT ITrayWindow *tray, HWND hWndStartButton) { m_Tray = tray; - m_BandID = (DWORD) -1; - m_hWndStartButton = hWndStartButton; return S_OK; }
Modified: trunk/reactos/base/shell/explorer/traywnd.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traywnd... ============================================================================== --- trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] Sat Jul 22 09:13:33 2017 @@ -1688,8 +1688,14 @@ pRect->top = pRect->bottom - (rebarRect.bottom - rebarRect.top + margins.cy); break; case ABE_LEFT: + rebarRect.right = rebarRect.left + (pRect->right - pRect->left - margins.cx); + ::SendMessageW(m_Rebar, RB_SIZETORECT, RBSTR_CHANGERECT, (LPARAM)&rebarRect); + pRect->right = pRect->left + (rebarRect.right - rebarRect.left + margins.cx); + break; case ABE_RIGHT: - /* FIXME: what to do here? */ + rebarRect.left = rebarRect.right - (pRect->right - pRect->left - margins.cx); + ::SendMessageW(m_Rebar, RB_SIZETORECT, RBSTR_CHANGERECT, (LPARAM)&rebarRect); + pRect->left = pRect->right - (rebarRect.right - rebarRect.left + margins.cx); break; }