// on its panel
virtual void SetDefault() { }
+ // Buttons on MSW can look bad if they are not native colours, because
+ // then they become owner-drawn and not theme-drawn. Disable it here
+ // in wxButtonBase to make it consistent.
+ virtual bool ShouldInheritColours() const { return false; }
+
// returns the default button size for this platform
static wxSize GetDefaultSize();
void ApplyWidgetStyle();
bool IsOwnGtkWindow( GdkWindow *window );
+ // Since this wxButton doesn't derive from wxButtonBase (why?) we need
+ // to override this here too...
+ virtual bool ShouldInheritColours() const { return false; }
+
protected:
virtual wxSize DoGetBestSize() const;
void ApplyWidgetStyle();
bool IsOwnGtkWindow( GdkWindow *window );
+ // Since this wxButton doesn't derive from wxButtonBase (why?) we need
+ // to override this here too...
+ virtual bool ShouldInheritColours() const { return false; }
+
protected:
virtual wxSize DoGetBestSize() const;
m_parent->DoAddChild( this );
PostCreation();
-
- SetBackgroundColour( parent->GetBackgroundColour() );
+ InheritAttributes();
Show( TRUE );
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize best_size( DoGetBestSize() );
wxSize new_size( size );
SetSize( new_size );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
SetBestSize(size);
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_focusWidget = combo->entry;
PostCreation();
+ InheritAttributes();
ConnectWidget( combo->button );
gtk_widget_set_usize( m_widget, new_size.x, new_size.y );
}
- SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX ) );
- SetForegroundColour( parent->GetForegroundColour() );
- SetFont( parent->GetFont() );
+ InheritAttributes();
Show( TRUE );
m_parent->DoAddChild( this );
PostCreation();
+ InheritAttributes();
ApplyWidgetStyle();
if (newSize.y == -1) newSize.y = ls.y;
SetSize( newSize.x, newSize.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
+ InheritAttributes();
SetBestSize(size);
- SetBackgroundColour( parent->GetBackgroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetBackgroundColour( parent->GetBackgroundColour() );
+ InheritAttributes();
Show( TRUE );
m_parent->DoAddChild( this );
PostCreation();
-
- SetBackgroundColour( parent->GetBackgroundColour() );
+ InheritAttributes();
Show( TRUE );
m_parent->DoAddChild( this );
PostCreation();
+ InheritAttributes();
- SetFont( parent->GetFont() );
-
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if (new_size.x == -1)
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
-
SetValue( value );
Show( TRUE );
ApplyWidgetStyle();
- wxControl::SetFont( parent->GetFont() );
+ InheritAttributes();
+// wxControl::SetFont( parent->GetFont() );
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
+// if (ShouldInheritColours())
+// {
+// SetBackgroundColour( parent->GetBackgroundColour() );
+// SetForegroundColour( parent->GetForegroundColour() );
+// }
Show( TRUE );
return TRUE;
m_focusWidget = m_text;
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
m_parent->DoAddChild(this);
PostCreation();
-
- SetFont(parent->GetFont());
+ InheritAttributes();
wxSize size_best(DoGetBestSize());
wxSize new_size(size);
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize(new_size.x, new_size.y);
- SetBackgroundColour(parent->GetBackgroundColour());
- SetForegroundColour(parent->GetForegroundColour());
-
Show(TRUE);
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetBackgroundColour( parent->GetBackgroundColour() );
+ InheritAttributes();
Show( TRUE );
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize best_size( DoGetBestSize() );
wxSize new_size( size );
SetSize( new_size );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
SetBestSize(size);
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_focusWidget = combo->entry;
PostCreation();
+ InheritAttributes();
ConnectWidget( combo->button );
gtk_widget_set_usize( m_widget, new_size.x, new_size.y );
}
- SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX ) );
- SetForegroundColour( parent->GetForegroundColour() );
- SetFont( parent->GetFont() );
+ InheritAttributes();
Show( TRUE );
m_parent->DoAddChild( this );
PostCreation();
+ InheritAttributes();
ApplyWidgetStyle();
if (newSize.y == -1) newSize.y = ls.y;
SetSize( newSize.x, newSize.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
+ InheritAttributes();
SetBestSize(size);
- SetBackgroundColour( parent->GetBackgroundColour() );
-
Show( TRUE );
return TRUE;
m_parent->DoAddChild( this );
PostCreation();
-
- SetBackgroundColour( parent->GetBackgroundColour() );
+ InheritAttributes();
Show( TRUE );
m_parent->DoAddChild( this );
PostCreation();
-
- SetBackgroundColour( parent->GetBackgroundColour() );
+ InheritAttributes();
Show( TRUE );
m_parent->DoAddChild( this );
PostCreation();
+ InheritAttributes();
- SetFont( parent->GetFont() );
-
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if (new_size.x == -1)
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
-
SetValue( value );
Show( TRUE );
ApplyWidgetStyle();
- wxControl::SetFont( parent->GetFont() );
+ InheritAttributes();
+// wxControl::SetFont( parent->GetFont() );
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
+// if (ShouldInheritColours())
+// {
+// SetBackgroundColour( parent->GetBackgroundColour() );
+// SetForegroundColour( parent->GetForegroundColour() );
+// }
Show( TRUE );
return TRUE;
m_focusWidget = m_text;
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
m_parent->DoAddChild(this);
PostCreation();
-
- SetFont(parent->GetFont());
+ InheritAttributes();
wxSize size_best(DoGetBestSize());
wxSize new_size(size);
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize(new_size.x, new_size.y);
- SetBackgroundColour(parent->GetBackgroundColour());
- SetForegroundColour(parent->GetForegroundColour());
-
Show(TRUE);
return TRUE;