mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 09:11:45 +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;
|
return m_hWnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
void
|
||||||
CMainToolbar::HideButtonCaption()
|
CMainToolbar::ShowButtonCaption(bool bShow)
|
||||||
{
|
{
|
||||||
DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
|
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
|
||||||
VOID
|
SendMessageW(TB_SETEXTENDEDSTYLE, 0, dCurrentExStyle | TBSTYLE_EX_MIXEDBUTTONS);
|
||||||
CMainToolbar::ShowButtonCaption()
|
|
||||||
{
|
|
||||||
DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
|
|
||||||
SendMessageW(TB_SETEXTENDEDSTYLE, 0, dCurrentExStyle & ~TBSTYLE_EX_MIXEDBUTTONS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
@ -1737,11 +1733,11 @@ CApplicationView::OnSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
if (dSearchbarMargin > dToolbarTreshold)
|
if (dSearchbarMargin > dToolbarTreshold)
|
||||||
{
|
{
|
||||||
m_Toolbar->ShowButtonCaption();
|
m_Toolbar->ShowButtonCaption(true);
|
||||||
}
|
}
|
||||||
else if (dSearchbarMargin < dToolbarTreshold)
|
else if (dSearchbarMargin < dToolbarTreshold)
|
||||||
{
|
{
|
||||||
m_Toolbar->HideButtonCaption();
|
m_Toolbar->ShowButtonCaption(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
RECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
|
RECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
|
||||||
|
|
|
@ -293,10 +293,8 @@ class CMainToolbar : public CUiWindow<CToolbar<>>
|
||||||
HWND
|
HWND
|
||||||
Create(HWND hwndParent);
|
Create(HWND hwndParent);
|
||||||
|
|
||||||
VOID
|
void
|
||||||
HideButtonCaption();
|
ShowButtonCaption(bool bShow);
|
||||||
VOID
|
|
||||||
ShowButtonCaption();
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
GetMaxButtonsWidth() const;
|
GetMaxButtonsWidth() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue