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:
Julian Smart
2007-02-09 14:05:11 +00:00
parent e0666bdc7b
commit a61c912241
4 changed files with 22 additions and 38 deletions

View File

@@ -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}

View File

@@ -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

View File

@@ -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,

View File

@@ -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;