only use font/colours in SetWidgetStyle() if they're set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4166,7 +4166,7 @@ void wxWindowGTK::SetWidgetStyle()
|
|||||||
|
|
||||||
GtkStyle *style = GetWidgetStyle();
|
GtkStyle *style = GetWidgetStyle();
|
||||||
|
|
||||||
if (m_font != wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ))
|
if ( m_hasFont )
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK20__
|
#ifdef __WXGTK20__
|
||||||
pango_font_description_free( style->font_desc );
|
pango_font_description_free( style->font_desc );
|
||||||
@@ -4177,7 +4177,7 @@ void wxWindowGTK::SetWidgetStyle()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_foregroundColour.Ok())
|
if ( m_hasFgCol )
|
||||||
{
|
{
|
||||||
m_foregroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
|
m_foregroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
|
||||||
if (m_foregroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT))
|
if (m_foregroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT))
|
||||||
@@ -4203,7 +4203,7 @@ void wxWindowGTK::SetWidgetStyle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_backgroundColour.Ok())
|
if ( m_hasBgCol )
|
||||||
{
|
{
|
||||||
m_backgroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
|
m_backgroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
|
||||||
if (m_backgroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE))
|
if (m_backgroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE))
|
||||||
|
@@ -4166,7 +4166,7 @@ void wxWindowGTK::SetWidgetStyle()
|
|||||||
|
|
||||||
GtkStyle *style = GetWidgetStyle();
|
GtkStyle *style = GetWidgetStyle();
|
||||||
|
|
||||||
if (m_font != wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ))
|
if ( m_hasFont )
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK20__
|
#ifdef __WXGTK20__
|
||||||
pango_font_description_free( style->font_desc );
|
pango_font_description_free( style->font_desc );
|
||||||
@@ -4177,7 +4177,7 @@ void wxWindowGTK::SetWidgetStyle()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_foregroundColour.Ok())
|
if ( m_hasFgCol )
|
||||||
{
|
{
|
||||||
m_foregroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
|
m_foregroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
|
||||||
if (m_foregroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT))
|
if (m_foregroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT))
|
||||||
@@ -4203,7 +4203,7 @@ void wxWindowGTK::SetWidgetStyle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_backgroundColour.Ok())
|
if ( m_hasBgCol )
|
||||||
{
|
{
|
||||||
m_backgroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
|
m_backgroundColour.CalcPixel( gtk_widget_get_colormap( m_widget ) );
|
||||||
if (m_backgroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE))
|
if (m_backgroundColour != wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE))
|
||||||
|
Reference in New Issue
Block a user