Worked around font setting problem for GTK+1 on some
distributions. This is a workaround for wxGrid only. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b67c2b8794
commit
ea2d542c01
@ -502,9 +502,11 @@ void wxGridCellEditor::Show(bool show, wxGridCellAttr *attr)
|
|||||||
m_colBgOld = m_control->GetBackgroundColour();
|
m_colBgOld = m_control->GetBackgroundColour();
|
||||||
m_control->SetBackgroundColour(attr->GetBackgroundColour());
|
m_control->SetBackgroundColour(attr->GetBackgroundColour());
|
||||||
|
|
||||||
|
// Workaround for GTK+1 font setting problem on some platforms
|
||||||
|
#if !defined(__WXGTK__) || defined(__WXGTK20__)
|
||||||
m_fontOld = m_control->GetFont();
|
m_fontOld = m_control->GetFont();
|
||||||
m_control->SetFont(attr->GetFont());
|
m_control->SetFont(attr->GetFont());
|
||||||
|
#endif
|
||||||
// can't do anything more in the base class version, the other
|
// can't do anything more in the base class version, the other
|
||||||
// attributes may only be used by the derived classes
|
// attributes may only be used by the derived classes
|
||||||
}
|
}
|
||||||
@ -523,12 +525,14 @@ void wxGridCellEditor::Show(bool show, wxGridCellAttr *attr)
|
|||||||
m_control->SetBackgroundColour(m_colBgOld);
|
m_control->SetBackgroundColour(m_colBgOld);
|
||||||
m_colBgOld = wxNullColour;
|
m_colBgOld = wxNullColour;
|
||||||
}
|
}
|
||||||
|
// Workaround for GTK+1 font setting problem on some platforms
|
||||||
|
#if !defined(__WXGTK__) || defined(__WXGTK20__)
|
||||||
if ( m_fontOld.Ok() )
|
if ( m_fontOld.Ok() )
|
||||||
{
|
{
|
||||||
m_control->SetFont(m_fontOld);
|
m_control->SetFont(m_fontOld);
|
||||||
m_fontOld = wxNullFont;
|
m_fontOld = wxNullFont;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -733,6 +733,7 @@ void wxComboBox::OnSize( wxSizeEvent &event )
|
|||||||
void wxComboBox::DoApplyWidgetStyle(GtkRcStyle *style)
|
void wxComboBox::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||||
{
|
{
|
||||||
// gtk_widget_modify_style( GTK_COMBO(m_widget)->button, syle );
|
// gtk_widget_modify_style( GTK_COMBO(m_widget)->button, syle );
|
||||||
|
|
||||||
gtk_widget_modify_style( GTK_COMBO(m_widget)->entry, style );
|
gtk_widget_modify_style( GTK_COMBO(m_widget)->entry, style );
|
||||||
gtk_widget_modify_style( GTK_COMBO(m_widget)->list, style );
|
gtk_widget_modify_style( GTK_COMBO(m_widget)->list, style );
|
||||||
|
|
||||||
|
@ -733,6 +733,7 @@ void wxComboBox::OnSize( wxSizeEvent &event )
|
|||||||
void wxComboBox::DoApplyWidgetStyle(GtkRcStyle *style)
|
void wxComboBox::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||||
{
|
{
|
||||||
// gtk_widget_modify_style( GTK_COMBO(m_widget)->button, syle );
|
// gtk_widget_modify_style( GTK_COMBO(m_widget)->button, syle );
|
||||||
|
|
||||||
gtk_widget_modify_style( GTK_COMBO(m_widget)->entry, style );
|
gtk_widget_modify_style( GTK_COMBO(m_widget)->entry, style );
|
||||||
gtk_widget_modify_style( GTK_COMBO(m_widget)->list, style );
|
gtk_widget_modify_style( GTK_COMBO(m_widget)->list, style );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user