changeset 3895:266c09408c07

some skins have lesser SKIN_PLAYPAUSE
author Tomasz Mon <desowin@gmail.com>
date Fri, 02 Nov 2007 19:33:30 +0100
parents bd11d516f367
children e794ae16017e
files src/audacious/skin.c src/audacious/ui_skinned_playstatus.c src/audacious/ui_skinned_playstatus.h
diffstat 3 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/skin.c	Fri Nov 02 19:26:17 2007 +0100
+++ b/src/audacious/skin.c	Fri Nov 02 19:33:30 2007 +0100
@@ -49,6 +49,7 @@
 
 #include "ui_skinned_window.h"
 #include "ui_skinned_number.h"
+#include "ui_skinned_playstatus.h"
 
 #define EXTENSION_TARGETS 7
 
@@ -1619,6 +1620,10 @@
     if (pixmap && skin->properties.mainwin_height > pixmap->height)
         skin->properties.mainwin_height = pixmap->height;
 
+    pixmap = skin_get_pixmap(skin, SKIN_PLAYPAUSE);
+    if (pixmap)
+        ui_skinned_playstatus_set_size(mainwin_playstatus, 11, pixmap->height);
+
     return error;
 }
 
--- a/src/audacious/ui_skinned_playstatus.c	Fri Nov 02 19:26:17 2007 +0100
+++ b/src/audacious/ui_skinned_playstatus.c	Fri Nov 02 19:33:30 2007 +0100
@@ -250,3 +250,13 @@
     playstatus->buffering = status;
     gtk_widget_queue_draw(widget);
 }
+
+void ui_skinned_playstatus_set_size(GtkWidget *widget, gint width, gint height) {
+    g_return_if_fail (UI_SKINNED_IS_PLAYSTATUS (widget));
+    UiSkinnedPlaystatus *playstatus = UI_SKINNED_PLAYSTATUS (widget);
+
+    playstatus->width = width;
+    playstatus->height = height;
+
+    gtk_widget_set_size_request(widget, width*(1+playstatus->double_size), height*(1+playstatus->double_size));
+}
--- a/src/audacious/ui_skinned_playstatus.h	Fri Nov 02 19:26:17 2007 +0100
+++ b/src/audacious/ui_skinned_playstatus.h	Fri Nov 02 19:33:30 2007 +0100
@@ -63,6 +63,7 @@
 GtkType ui_skinned_playstatus_get_type(void);
 void ui_skinned_playstatus_set_status(GtkWidget *widget, PStatus status);
 void ui_skinned_playstatus_set_buffering(GtkWidget *widget, gboolean status);
+void ui_skinned_playstatus_set_size(GtkWidget *widget, gint width, gint height);
 
 #ifdef __cplusplus
 }