X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/98a8daf4cffee3857f0cdd2ee960514a1ff3a2c0..786c4e23f5d91c319804b4204ebda023b959794c:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index a2ad1509bb..1a9ae3ca2d 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1416,14 +1416,6 @@ bool wxTextCtrl::SetBackgroundColour( const wxColour &colour ) if (!m_widget->window) return FALSE; - wxColour sysbg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ); - if (sysbg.Red() == colour.Red() && - sysbg.Green() == colour.Green() && - sysbg.Blue() == colour.Blue()) - { - return FALSE; // FIXME or TRUE? - } - if (!m_backgroundColour.Ok()) return FALSE; @@ -1535,10 +1527,9 @@ bool wxTextCtrl::SetStyle( long start, long end, const wxTextAttr& style ) } } -void wxTextCtrl::ApplyWidgetStyle() +void wxTextCtrl::DoApplyWidgetStyle(GtkRcStyle *style) { - SetWidgetStyle(); - gtk_widget_set_style( m_text, m_widgetStyle ); + gtk_widget_modify_style(m_text, style); } void wxTextCtrl::OnCut(wxCommandEvent& WXUNUSED(event)) @@ -1634,7 +1625,9 @@ wxSize wxTextCtrl::DoGetBestSize() const { // FIXME should be different for multi-line controls... wxSize ret( wxControl::DoGetBestSize() ); - return wxSize(80, ret.y); + wxSize best(80, ret.y); + CacheBestSize(best); + return best; } // ----------------------------------------------------------------------------