changeset 2854:9f37fd52e7d0 trunk

use correct skin indexes
author Tomasz Mon <desowin@gmail.com>
date Fri, 22 Jun 2007 17:38:06 +0200
parents bec320cfcc12
children 7f1b2734af36
files src/audacious/ui_skinned_button.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_skinned_button.c	Fri Jun 22 17:23:58 2007 +0200
+++ b/src/audacious/ui_skinned_button.c	Fri Jun 22 17:38:06 2007 +0200
@@ -442,19 +442,22 @@
             obj = gdk_pixmap_new(NULL, priv->w, priv->h, gdk_rgb_get_visual()->depth);
             switch (button->type) {
                 case TYPE_PUSH:
-                    skin_draw_pixmap(bmp_active_skin, obj, priv->gc, priv->skin_index2,
+                    skin_draw_pixmap(bmp_active_skin, obj, priv->gc,
+                                     button->pressed ? priv->skin_index2 : priv->skin_index1,
                                      button->pressed ? button->px : button->nx,
                                      button->pressed ? button->py : button->ny,
                                      0, 0, priv->w, priv->h);
                     break;
                 case TYPE_TOGGLE:
                     if (button->inside)
-                        skin_draw_pixmap(bmp_active_skin, obj, priv->gc, priv->skin_index2,
+                        skin_draw_pixmap(bmp_active_skin, obj, priv->gc,
+                                         button->pressed ? priv->skin_index2 : priv->skin_index1,
                                          button->pressed ? button->ppx : button->pnx,
                                          button->pressed ? button->ppy : button->pny,
                                          0, 0, priv->w, priv->h);
                     else
-                        skin_draw_pixmap(bmp_active_skin, obj, priv->gc, priv->skin_index2,
+                        skin_draw_pixmap(bmp_active_skin, obj, priv->gc,
+                                         button->pressed ? priv->skin_index2 : priv->skin_index1,
                                          button->pressed ? button->px : button->nx,
                                          button->pressed ? button->py : button->ny,
                                          0, 0, priv->w, priv->h);