Corrected bmpbutton size

added wxNO_BORDER style to button classes
  added WMclass and WMname strings to dialogs and frames
  added flag to scroll sample


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-05-08 14:18:51 +00:00
parent 2a4f27f209
commit de1c750f7e
9 changed files with 63 additions and 27 deletions

View File

@@ -130,7 +130,12 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
m_label = "";
m_widget = gtk_button_new();
#if (GTK_MINOR_VERSION > 0)
if (style & wxNO_BORDER)
gtk_button_set_relief( GTK_BUTTON(m_widget), GTK_RELIEF_NONE );
#endif
if (m_bitmap.Ok())
{
GdkBitmap *mask = (GdkBitmap *) NULL;
@@ -141,8 +146,10 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
gtk_container_add( GTK_CONTAINER(m_widget), pixmap );
}
if (newSize.x == -1) newSize.x = m_bitmap.GetHeight()+10;
if (newSize.y == -1) newSize.y = m_bitmap.GetWidth()+10;
int border = 10;
if (style & wxNO_BORDER) border = 4;
if (newSize.x == -1) newSize.x = m_bitmap.GetWidth()+border;
if (newSize.y == -1) newSize.y = m_bitmap.GetHeight()+border;
SetSize( newSize.x, newSize.y );
gtk_signal_connect( GTK_OBJECT(m_widget), "clicked",
@@ -202,25 +209,25 @@ void wxBitmapButton::SetBitmap()
wxBitmap the_one;
if ( ! m_isEnabled )
if (!m_isEnabled)
the_one = m_disabled;
else
{
if ( m_isSelected )
if (m_isSelected)
{
the_one = m_selected;
}
else
{
if ( m_hasFocus )
if (m_hasFocus)
the_one = m_focus;
else
the_one = m_bitmap;
}
}
if ( ! the_one.Ok() ) the_one = m_bitmap;
if ( ! the_one.Ok() ) return;
if (!the_one.Ok()) the_one = m_bitmap;
if (!the_one.Ok()) return;
GtkButton *bin = GTK_BUTTON( m_widget );
GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child );