MAcOS X clears the background (with stripes) for
us, so there is no need to do it again. This solves to optical bugs for the wxStatusBar and wxStaticText. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d21d2e5adf
commit
00500f403c
@ -127,6 +127,17 @@ void wxStatusBarGeneric::SetStatusText(const wxString& text, int number)
|
||||
|
||||
m_statusStrings[number] = text;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
int major,minor;
|
||||
wxGetOsVersion( &major, &minor );
|
||||
|
||||
if (major >= 10)
|
||||
{
|
||||
Refresh();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
wxRect rect;
|
||||
GetFieldRect(number, rect);
|
||||
wxClientDC dc(this);
|
||||
|
@ -15,9 +15,13 @@
|
||||
|
||||
#include "wx/settings.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/utils.h"
|
||||
|
||||
wxColour wxSystemSettings::GetSystemColour(int index)
|
||||
{
|
||||
int major,minor;
|
||||
wxGetOsVersion( &major, &minor );
|
||||
|
||||
switch( index )
|
||||
{
|
||||
case wxSYS_COLOUR_SCROLLBAR :
|
||||
@ -34,8 +38,13 @@ wxColour wxSystemSettings::GetSystemColour(int index)
|
||||
break ;
|
||||
|
||||
case wxSYS_COLOUR_LISTBOX :
|
||||
{
|
||||
if (major >= 10)
|
||||
return *wxWHITE ;
|
||||
else
|
||||
return wxColor( 0xEE , 0xEE , 0xEE ) ;
|
||||
break ;
|
||||
}
|
||||
case wxSYS_COLOUR_BTNSHADOW:
|
||||
return wxColor( 0x44 , 0x44 , 0x44 ) ;
|
||||
break ;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "wx/tabctrl.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/utils.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@ -131,6 +132,9 @@ void wxStaticText::OnDraw( wxDC &dc )
|
||||
int i = 0 ;
|
||||
wxString text = m_label;
|
||||
|
||||
int major,minor;
|
||||
wxGetOsVersion( &major, &minor );
|
||||
|
||||
PrepareDC(dc);
|
||||
|
||||
bool doClear = true ;
|
||||
@ -148,6 +152,8 @@ void wxStaticText::OnDraw( wxDC &dc )
|
||||
break ;
|
||||
}
|
||||
|
||||
if (major < 10)
|
||||
{
|
||||
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
|
||||
{
|
||||
if ( ((wxControl*)parent)->GetMacControl() ) {
|
||||
@ -160,12 +166,14 @@ void wxStaticText::OnDraw( wxDC &dc )
|
||||
}
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
parent = parent->GetParent() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( doClear )
|
||||
|
||||
if ( (major < 10) && doClear )
|
||||
dc.Clear() ;
|
||||
|
||||
while (i < text.Length())
|
||||
|
@ -15,9 +15,13 @@
|
||||
|
||||
#include "wx/settings.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/utils.h"
|
||||
|
||||
wxColour wxSystemSettings::GetSystemColour(int index)
|
||||
{
|
||||
int major,minor;
|
||||
wxGetOsVersion( &major, &minor );
|
||||
|
||||
switch( index )
|
||||
{
|
||||
case wxSYS_COLOUR_SCROLLBAR :
|
||||
@ -34,8 +38,13 @@ wxColour wxSystemSettings::GetSystemColour(int index)
|
||||
break ;
|
||||
|
||||
case wxSYS_COLOUR_LISTBOX :
|
||||
{
|
||||
if (major >= 10)
|
||||
return *wxWHITE ;
|
||||
else
|
||||
return wxColor( 0xEE , 0xEE , 0xEE ) ;
|
||||
break ;
|
||||
}
|
||||
case wxSYS_COLOUR_BTNSHADOW:
|
||||
return wxColor( 0x44 , 0x44 , 0x44 ) ;
|
||||
break ;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "wx/tabctrl.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/utils.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@ -131,6 +132,9 @@ void wxStaticText::OnDraw( wxDC &dc )
|
||||
int i = 0 ;
|
||||
wxString text = m_label;
|
||||
|
||||
int major,minor;
|
||||
wxGetOsVersion( &major, &minor );
|
||||
|
||||
PrepareDC(dc);
|
||||
|
||||
bool doClear = true ;
|
||||
@ -148,6 +152,8 @@ void wxStaticText::OnDraw( wxDC &dc )
|
||||
break ;
|
||||
}
|
||||
|
||||
if (major < 10)
|
||||
{
|
||||
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
|
||||
{
|
||||
if ( ((wxControl*)parent)->GetMacControl() ) {
|
||||
@ -160,12 +166,14 @@ void wxStaticText::OnDraw( wxDC &dc )
|
||||
}
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
parent = parent->GetParent() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( doClear )
|
||||
|
||||
if ( (major < 10) && doClear )
|
||||
dc.Clear() ;
|
||||
|
||||
while (i < text.Length())
|
||||
|
Loading…
Reference in New Issue
Block a user