mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[RAPPS] Merge CMainToolbar::Show/HideButtonCaption() into one single function.
This commit is contained in:
parent
e8cf32cf15
commit
385274e2dd
2 changed files with 10 additions and 16 deletions
|
@ -157,18 +157,14 @@ CMainToolbar::Create(HWND hwndParent)
|
|||
return m_hWnd;
|
||||
}
|
||||
|
||||
VOID
|
||||
CMainToolbar::HideButtonCaption()
|
||||
void
|
||||
CMainToolbar::ShowButtonCaption(bool bShow)
|
||||
{
|
||||
DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
|
||||
SendMessageW(TB_SETEXTENDEDSTYLE, 0, dCurrentExStyle | TBSTYLE_EX_MIXEDBUTTONS);
|
||||
}
|
||||
|
||||
VOID
|
||||
CMainToolbar::ShowButtonCaption()
|
||||
{
|
||||
DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
|
||||
SendMessageW(TB_SETEXTENDEDSTYLE, 0, dCurrentExStyle & ~TBSTYLE_EX_MIXEDBUTTONS);
|
||||
if (bShow)
|
||||
SendMessageW(TB_SETEXTENDEDSTYLE, 0, dCurrentExStyle & ~TBSTYLE_EX_MIXEDBUTTONS);
|
||||
else
|
||||
SendMessageW(TB_SETEXTENDEDSTYLE, 0, dCurrentExStyle | TBSTYLE_EX_MIXEDBUTTONS);
|
||||
}
|
||||
|
||||
DWORD
|
||||
|
@ -1737,11 +1733,11 @@ CApplicationView::OnSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
if (dSearchbarMargin > dToolbarTreshold)
|
||||
{
|
||||
m_Toolbar->ShowButtonCaption();
|
||||
m_Toolbar->ShowButtonCaption(true);
|
||||
}
|
||||
else if (dSearchbarMargin < dToolbarTreshold)
|
||||
{
|
||||
m_Toolbar->HideButtonCaption();
|
||||
m_Toolbar->ShowButtonCaption(false);
|
||||
}
|
||||
|
||||
RECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
|
||||
|
|
|
@ -293,10 +293,8 @@ class CMainToolbar : public CUiWindow<CToolbar<>>
|
|||
HWND
|
||||
Create(HWND hwndParent);
|
||||
|
||||
VOID
|
||||
HideButtonCaption();
|
||||
VOID
|
||||
ShowButtonCaption();
|
||||
void
|
||||
ShowButtonCaption(bool bShow);
|
||||
|
||||
DWORD
|
||||
GetMaxButtonsWidth() const;
|
||||
|
|
Loading…
Reference in a new issue