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:
@@ -127,6 +127,17 @@ void wxStatusBarGeneric::SetStatusText(const wxString& text, int number)
|
|||||||
|
|
||||||
m_statusStrings[number] = text;
|
m_statusStrings[number] = text;
|
||||||
|
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
int major,minor;
|
||||||
|
wxGetOsVersion( &major, &minor );
|
||||||
|
|
||||||
|
if (major >= 10)
|
||||||
|
{
|
||||||
|
Refresh();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
wxRect rect;
|
wxRect rect;
|
||||||
GetFieldRect(number, rect);
|
GetFieldRect(number, rect);
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
|
@@ -15,9 +15,13 @@
|
|||||||
|
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
|
#include "wx/utils.h"
|
||||||
|
|
||||||
wxColour wxSystemSettings::GetSystemColour(int index)
|
wxColour wxSystemSettings::GetSystemColour(int index)
|
||||||
{
|
{
|
||||||
|
int major,minor;
|
||||||
|
wxGetOsVersion( &major, &minor );
|
||||||
|
|
||||||
switch( index )
|
switch( index )
|
||||||
{
|
{
|
||||||
case wxSYS_COLOUR_SCROLLBAR :
|
case wxSYS_COLOUR_SCROLLBAR :
|
||||||
@@ -34,8 +38,13 @@ wxColour wxSystemSettings::GetSystemColour(int index)
|
|||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxSYS_COLOUR_LISTBOX :
|
case wxSYS_COLOUR_LISTBOX :
|
||||||
|
{
|
||||||
|
if (major >= 10)
|
||||||
|
return *wxWHITE ;
|
||||||
|
else
|
||||||
return wxColor( 0xEE , 0xEE , 0xEE ) ;
|
return wxColor( 0xEE , 0xEE , 0xEE ) ;
|
||||||
break ;
|
break ;
|
||||||
|
}
|
||||||
case wxSYS_COLOUR_BTNSHADOW:
|
case wxSYS_COLOUR_BTNSHADOW:
|
||||||
return wxColor( 0x44 , 0x44 , 0x44 ) ;
|
return wxColor( 0x44 , 0x44 , 0x44 ) ;
|
||||||
break ;
|
break ;
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "wx/tabctrl.h"
|
#include "wx/tabctrl.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
#include "wx/utils.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -131,6 +132,9 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
wxString text = m_label;
|
wxString text = m_label;
|
||||||
|
|
||||||
|
int major,minor;
|
||||||
|
wxGetOsVersion( &major, &minor );
|
||||||
|
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
|
||||||
bool doClear = true ;
|
bool doClear = true ;
|
||||||
@@ -148,6 +152,8 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (major < 10)
|
||||||
|
{
|
||||||
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
|
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
|
||||||
{
|
{
|
||||||
if ( ((wxControl*)parent)->GetMacControl() ) {
|
if ( ((wxControl*)parent)->GetMacControl() ) {
|
||||||
@@ -160,12 +166,14 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
parent = parent->GetParent() ;
|
parent = parent->GetParent() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( doClear )
|
|
||||||
|
if ( (major < 10) && doClear )
|
||||||
dc.Clear() ;
|
dc.Clear() ;
|
||||||
|
|
||||||
while (i < text.Length())
|
while (i < text.Length())
|
||||||
|
@@ -15,9 +15,13 @@
|
|||||||
|
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
|
#include "wx/utils.h"
|
||||||
|
|
||||||
wxColour wxSystemSettings::GetSystemColour(int index)
|
wxColour wxSystemSettings::GetSystemColour(int index)
|
||||||
{
|
{
|
||||||
|
int major,minor;
|
||||||
|
wxGetOsVersion( &major, &minor );
|
||||||
|
|
||||||
switch( index )
|
switch( index )
|
||||||
{
|
{
|
||||||
case wxSYS_COLOUR_SCROLLBAR :
|
case wxSYS_COLOUR_SCROLLBAR :
|
||||||
@@ -34,8 +38,13 @@ wxColour wxSystemSettings::GetSystemColour(int index)
|
|||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxSYS_COLOUR_LISTBOX :
|
case wxSYS_COLOUR_LISTBOX :
|
||||||
|
{
|
||||||
|
if (major >= 10)
|
||||||
|
return *wxWHITE ;
|
||||||
|
else
|
||||||
return wxColor( 0xEE , 0xEE , 0xEE ) ;
|
return wxColor( 0xEE , 0xEE , 0xEE ) ;
|
||||||
break ;
|
break ;
|
||||||
|
}
|
||||||
case wxSYS_COLOUR_BTNSHADOW:
|
case wxSYS_COLOUR_BTNSHADOW:
|
||||||
return wxColor( 0x44 , 0x44 , 0x44 ) ;
|
return wxColor( 0x44 , 0x44 , 0x44 ) ;
|
||||||
break ;
|
break ;
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "wx/tabctrl.h"
|
#include "wx/tabctrl.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
#include "wx/utils.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -131,6 +132,9 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
wxString text = m_label;
|
wxString text = m_label;
|
||||||
|
|
||||||
|
int major,minor;
|
||||||
|
wxGetOsVersion( &major, &minor );
|
||||||
|
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
|
||||||
bool doClear = true ;
|
bool doClear = true ;
|
||||||
@@ -148,6 +152,8 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (major < 10)
|
||||||
|
{
|
||||||
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
|
if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
|
||||||
{
|
{
|
||||||
if ( ((wxControl*)parent)->GetMacControl() ) {
|
if ( ((wxControl*)parent)->GetMacControl() ) {
|
||||||
@@ -160,12 +166,14 @@ void wxStaticText::OnDraw( wxDC &dc )
|
|||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
parent = parent->GetParent() ;
|
parent = parent->GetParent() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( doClear )
|
|
||||||
|
if ( (major < 10) && doClear )
|
||||||
dc.Clear() ;
|
dc.Clear() ;
|
||||||
|
|
||||||
while (i < text.Length())
|
while (i < text.Length())
|
||||||
|
Reference in New Issue
Block a user