Mercurial > audlegacy
diff src/audacious/ui_skinned_button.c @ 2844:22da7cd0eca0 trunk
UiSkinnedButton can now work as SButton
| author | Tomasz Mon <desowin@gmail.com> |
|---|---|
| date | Sun, 17 Jun 2007 16:53:40 +0200 |
| parents | 91ef09fe7936 |
| children | bec320cfcc12 |
line wrap: on
line diff
--- a/src/audacious/ui_skinned_button.c Sun Jun 17 15:53:59 2007 +0200 +++ b/src/audacious/ui_skinned_button.c Sun Jun 17 16:53:40 2007 +0200 @@ -292,6 +292,23 @@ gtk_fixed_put(GTK_FIXED(priv->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y); } +void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap *parent, GdkGC *gc, gint x, gint y, gint w, gint h) { + + UiSkinnedButton *sbutton = UI_SKINNED_BUTTON(button); + UiSkinnedButtonPrivate *priv = UI_SKINNED_BUTTON_GET_PRIVATE(sbutton); + priv->gc = gc; + priv->w = w; + priv->h = h; + sbutton->x = x; + sbutton->y = y; + sbutton->type = TYPE_SMALL; + priv->fixed = fixed; + priv->double_size = FALSE; + + gtk_widget_set_size_request(button, priv->w, priv->h); + gtk_fixed_put(GTK_FIXED(priv->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y); +} + static void ui_skinned_button_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { UiSkinnedButton *button = UI_SKINNED_BUTTON (widget); GtkAllocation child_alloc; @@ -414,6 +431,7 @@ GtkWidget *widget = GTK_WIDGET (button); UiSkinnedButtonPrivate *priv = UI_SKINNED_BUTTON_GET_PRIVATE (button); + //TYPE_SMALL doesn't have its own face if (button->type == TYPE_SMALL || button->type == TYPE_NOT_SET) return;
