Hide empty wxCheckBoxes in wxGTK to fix display problem
Focus rectangle was still drawn around the label when it was empty with some themes, so hide it completely to ensure this doesn't happen. Closes #17443.
This commit is contained in:
parent
fa54e1af15
commit
fc0108ce71
@ -101,6 +101,7 @@ wxGTK:
|
||||
- Support background colour in wxDataViewCtrl attributes.
|
||||
- Improve wxSpinCtrl best size calculation.
|
||||
- Implement support for icon locations in wxMimeTypesManager (Hanmac).
|
||||
- Cosmetic fix for empty wxCheckBoxes display (Chuddah).
|
||||
|
||||
wxMSW:
|
||||
|
||||
|
@ -204,6 +204,13 @@ void wxCheckBox::SetLabel( const wxString& label )
|
||||
{
|
||||
wxCHECK_RET( m_widgetLabel != NULL, wxT("invalid checkbox") );
|
||||
|
||||
// If we don't hide the empty label, in some themes a focus rectangle is
|
||||
// still drawn around it and this looks out of place.
|
||||
if ( label.empty() )
|
||||
gtk_widget_hide(m_widgetLabel);
|
||||
else
|
||||
gtk_widget_show(m_widgetLabel);
|
||||
|
||||
// save the label inside m_label in case user calls GetLabel() later
|
||||
wxControl::SetLabel(label);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user