Fixed bug that showed a small gap on the wxStaticBox when the label
string was empty. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8f2a41e964
commit
0154a29737
@ -58,7 +58,7 @@ bool wxStaticBox::Create( wxWindow *parent,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_widget = gtk_frame_new(m_label.empty() ? (char *)NULL : m_label.mbc_str());
|
||||
m_widget = gtk_frame_new(label.empty() ? (char *)NULL : label.mbc_str());
|
||||
|
||||
m_parent->DoAddChild( this );
|
||||
|
||||
@ -79,7 +79,7 @@ bool wxStaticBox::Create( wxWindow *parent,
|
||||
|
||||
if ( xalign )
|
||||
gtk_frame_set_label_align(GTK_FRAME( m_widget ), xalign, 0.0);
|
||||
|
||||
|
||||
Show( TRUE );
|
||||
|
||||
return TRUE;
|
||||
@ -89,7 +89,8 @@ void wxStaticBox::SetLabel( const wxString &label )
|
||||
{
|
||||
wxControl::SetLabel( label );
|
||||
|
||||
gtk_frame_set_label( GTK_FRAME( m_widget ), GetLabel().mbc_str() );
|
||||
gtk_frame_set_label( GTK_FRAME( m_widget ),
|
||||
label.empty() ? (char *)NULL : label.mbc_str() );
|
||||
}
|
||||
|
||||
void wxStaticBox::ApplyWidgetStyle()
|
||||
|
@ -58,7 +58,7 @@ bool wxStaticBox::Create( wxWindow *parent,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_widget = gtk_frame_new(m_label.empty() ? (char *)NULL : m_label.mbc_str());
|
||||
m_widget = gtk_frame_new(label.empty() ? (char *)NULL : label.mbc_str());
|
||||
|
||||
m_parent->DoAddChild( this );
|
||||
|
||||
@ -79,7 +79,7 @@ bool wxStaticBox::Create( wxWindow *parent,
|
||||
|
||||
if ( xalign )
|
||||
gtk_frame_set_label_align(GTK_FRAME( m_widget ), xalign, 0.0);
|
||||
|
||||
|
||||
Show( TRUE );
|
||||
|
||||
return TRUE;
|
||||
@ -89,7 +89,8 @@ void wxStaticBox::SetLabel( const wxString &label )
|
||||
{
|
||||
wxControl::SetLabel( label );
|
||||
|
||||
gtk_frame_set_label( GTK_FRAME( m_widget ), GetLabel().mbc_str() );
|
||||
gtk_frame_set_label( GTK_FRAME( m_widget ),
|
||||
label.empty() ? (char *)NULL : label.mbc_str() );
|
||||
}
|
||||
|
||||
void wxStaticBox::ApplyWidgetStyle()
|
||||
|
Loading…
Reference in New Issue
Block a user