Reverted renderer changes and just use window variant within renderer functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,10 +74,6 @@ enum
|
||||
wxCONTROL_SELECTED = 0x00000020, // selected item in e.g. listbox
|
||||
wxCONTROL_CHECKED = 0x00000040, // (check/radio button) is checked
|
||||
wxCONTROL_CHECKABLE = 0x00000080, // (menu) item can be checked
|
||||
wxCONTROL_SIZE_NORMAL = 0x00000100,
|
||||
wxCONTROL_SIZE_LARGE = 0x00000200,
|
||||
wxCONTROL_SIZE_SMALL = 0x00000400,
|
||||
wxCONTROL_SIZE_MINI = 0x00000800,
|
||||
wxCONTROL_UNDETERMINED = wxCONTROL_CHECKABLE // (check) undetermined state
|
||||
};
|
||||
\end{verbatim}
|
||||
|
@@ -62,12 +62,7 @@ enum
|
||||
wxCONTROL_CHECKABLE = 0x00000080, // (menu) item can be checked
|
||||
wxCONTROL_UNDETERMINED = wxCONTROL_CHECKABLE, // (check) undetermined state
|
||||
|
||||
wxCONTROL_SIZE_NORMAL = 0x00000100,
|
||||
wxCONTROL_SIZE_LARGE = 0x00000200,
|
||||
wxCONTROL_SIZE_SMALL = 0x00000400,
|
||||
wxCONTROL_SIZE_MINI = 0x00000800,
|
||||
|
||||
wxCONTROL_FLAGS_MASK = 0x00000fff,
|
||||
wxCONTROL_FLAGS_MASK = 0x000000ff,
|
||||
|
||||
// this is a pseudo flag not used directly by wxRenderer but rather by some
|
||||
// controls internally
|
||||
|
@@ -1347,11 +1347,6 @@ void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, int paintBg )
|
||||
}
|
||||
|
||||
// Draw standard button
|
||||
if (GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL)
|
||||
drawState |= wxCONTROL_SIZE_SMALL;
|
||||
else if (GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_MINI)
|
||||
drawState |= wxCONTROL_SIZE_MINI;
|
||||
|
||||
wxRendererNative::Get().DrawComboBoxDropButton(this,
|
||||
dc,
|
||||
drawRect,
|
||||
@@ -1385,11 +1380,6 @@ void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, int paintBg )
|
||||
dc.DrawRectangle(rect);
|
||||
}
|
||||
|
||||
if (GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL)
|
||||
drawState |= wxCONTROL_SIZE_SMALL;
|
||||
else if (GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_MINI)
|
||||
drawState |= wxCONTROL_SIZE_MINI;
|
||||
|
||||
wxRendererNative::Get().DrawPushButton(this,
|
||||
dc,
|
||||
drawRect,
|
||||
|
@@ -474,9 +474,9 @@ wxRendererMac::DrawComboBoxDropButton(wxWindow *win,
|
||||
int flags)
|
||||
{
|
||||
int kind;
|
||||
if (flags & wxCONTROL_SIZE_SMALL)
|
||||
if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL))
|
||||
kind = kThemeArrowButtonSmall;
|
||||
else if (flags & wxCONTROL_SIZE_MINI)
|
||||
else if (win->GetWindowVariant() == wxWINDOW_VARIANT_MINI || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_MINI))
|
||||
kind = kThemeArrowButtonMini;
|
||||
else
|
||||
kind = kThemeArrowButton;
|
||||
@@ -492,7 +492,10 @@ wxRendererMac::DrawPushButton(wxWindow *win,
|
||||
int flags)
|
||||
{
|
||||
int kind;
|
||||
if (flags & wxCONTROL_SIZE_SMALL)
|
||||
if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL))
|
||||
kind = kThemeBevelButtonSmall;
|
||||
// There is no kThemeBevelButtonMini, but in this case, use Small
|
||||
else if (win->GetWindowVariant() == wxWINDOW_VARIANT_MINI || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_MINI))
|
||||
kind = kThemeBevelButtonSmall;
|
||||
else
|
||||
kind = kThemeBevelButton;
|
||||
|
Reference in New Issue
Block a user