fixed rendering of wxTextCtrl's border with wxTE_RICH(2) styles and XP's Classic theme
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -148,6 +148,8 @@ wxMSW:
|
|||||||
for increased reliability and conformance to user expectations.
|
for increased reliability and conformance to user expectations.
|
||||||
- Fixed double Init() call in wxTopLevelWindow causing a memory leak on
|
- Fixed double Init() call in wxTopLevelWindow causing a memory leak on
|
||||||
SmartPhone.
|
SmartPhone.
|
||||||
|
- Fixed rendering of borders for wxTextCtrl with wxTE_RICH(2) style when
|
||||||
|
using Windows XP's Classic UI theme.
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -276,6 +276,22 @@ bool GetCursorPosWinCE(POINT* pt)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static wxBorder TranslateBorder(wxBorder border)
|
||||||
|
{
|
||||||
|
if ( border == wxBORDER_THEME )
|
||||||
|
{
|
||||||
|
#if defined(__POCKETPC__) || defined(__SMARTPHONE__)
|
||||||
|
return wxBORDER_SIMPLE;
|
||||||
|
#elif wxUSE_UXTHEME
|
||||||
|
if (wxUxThemeEngine::GetIfActive())
|
||||||
|
return wxBORDER_THEME;
|
||||||
|
#endif
|
||||||
|
return wxBORDER_SUNKEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return border;
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// event tables
|
// event tables
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -1365,7 +1381,7 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
|
|||||||
if ( flags & wxHSCROLL )
|
if ( flags & wxHSCROLL )
|
||||||
style |= WS_HSCROLL;
|
style |= WS_HSCROLL;
|
||||||
|
|
||||||
const wxBorder border = GetBorder(flags);
|
const wxBorder border = TranslateBorder(GetBorder(flags));
|
||||||
|
|
||||||
// WS_BORDER is only required for wxBORDER_SIMPLE
|
// WS_BORDER is only required for wxBORDER_SIMPLE
|
||||||
if ( border == wxBORDER_SIMPLE )
|
if ( border == wxBORDER_SIMPLE )
|
||||||
@@ -1429,13 +1445,7 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
|
|||||||
// 2.9 and above.
|
// 2.9 and above.
|
||||||
wxBorder wxWindowMSW::GetThemedBorderStyle() const
|
wxBorder wxWindowMSW::GetThemedBorderStyle() const
|
||||||
{
|
{
|
||||||
#if defined(__POCKETPC__) || defined(__SMARTPHONE__)
|
return TranslateBorder(wxBORDER_THEME);
|
||||||
return wxBORDER_SIMPLE;
|
|
||||||
#elif wxUSE_UXTHEME
|
|
||||||
if (wxUxThemeEngine::GetIfActive())
|
|
||||||
return wxBORDER_THEME;
|
|
||||||
#endif
|
|
||||||
return wxBORDER_SUNKEN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup background and foreground colours correctly
|
// Setup background and foreground colours correctly
|
||||||
@@ -3311,7 +3321,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
|
|||||||
case WM_NCCALCSIZE:
|
case WM_NCCALCSIZE:
|
||||||
{
|
{
|
||||||
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
|
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
|
||||||
if (theme && GetBorder() == wxBORDER_THEME)
|
if (theme && TranslateBorder(GetBorder()) == wxBORDER_THEME)
|
||||||
{
|
{
|
||||||
// first ask the widget to calculate the border size
|
// first ask the widget to calculate the border size
|
||||||
rc.result = MSWDefWindowProc(message, wParam, lParam);
|
rc.result = MSWDefWindowProc(message, wParam, lParam);
|
||||||
@@ -3351,7 +3361,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
|
|||||||
case WM_NCPAINT:
|
case WM_NCPAINT:
|
||||||
{
|
{
|
||||||
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
|
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
|
||||||
if (theme && GetBorder() == wxBORDER_THEME)
|
if (theme && TranslateBorder(GetBorder()) == wxBORDER_THEME)
|
||||||
{
|
{
|
||||||
// first ask the widget to paint its non-client area, such as scrollbars, etc.
|
// first ask the widget to paint its non-client area, such as scrollbars, etc.
|
||||||
rc.result = MSWDefWindowProc(message, wParam, lParam);
|
rc.result = MSWDefWindowProc(message, wParam, lParam);
|
||||||
|
Reference in New Issue
Block a user