changeset 4220:e6ef8287d115

fixed menurow and some obvious svis issues from svis, but IMHO ui_svis needs a rewrite because of too much hardcoded stuff
author Cristi Magherusan <majeru@atheme.org>
date Mon, 28 Jan 2008 00:10:33 +0200
parents 8a848179e244
children c399e0fa9791
files src/audacious/ui_skinned_menurow.c src/audacious/ui_svis.c
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_skinned_menurow.c	Sun Jan 27 23:34:26 2008 +0200
+++ b/src/audacious/ui_skinned_menurow.c	Mon Jan 28 00:10:33 2008 +0200
@@ -186,16 +186,16 @@
 static void ui_skinned_menurow_size_request(GtkWidget *widget, GtkRequisition *requisition) {
     UiSkinnedMenurow *menurow = UI_SKINNED_MENUROW(widget);
 
-    requisition->width = menurow->width*(1+menurow->scaled);
-    requisition->height = menurow->height*(1+menurow->scaled);
+    requisition->width = menurow->width*(menurow->scaled ? cfg.scale_factor : 1);
+    requisition->height = menurow->height*(menurow->scaled ? cfg.scale_factor : 1);
 }
 
 static void ui_skinned_menurow_size_allocate(GtkWidget *widget, GtkAllocation *allocation) {
     UiSkinnedMenurow *menurow = UI_SKINNED_MENUROW (widget);
 
     widget->allocation = *allocation;
-    widget->allocation.x *= (1+menurow->scaled);
-    widget->allocation.y *= (1+menurow->scaled);
+    widget->allocation.x *= (menurow->scaled ? cfg.scale_factor : 1);
+    widget->allocation.y *= (menurow->scaled ? cfg.scale_factor : 1);
     if (GTK_WIDGET_REALIZED (widget))
         gdk_window_move_resize(widget->window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height);
 
--- a/src/audacious/ui_svis.c	Sun Jan 27 23:34:26 2008 +0200
+++ b/src/audacious/ui_svis.c	Mon Jan 28 00:10:33 2008 +0200
@@ -242,16 +242,16 @@
 static void ui_svis_size_request(GtkWidget *widget, GtkRequisition *requisition) {
     UiSVis *svis = UI_SVIS(widget);
 
-    requisition->width = svis->width*(1+svis->scaled);
-    requisition->height = svis->height*(1+svis->scaled);
+    requisition->width = svis->width * (svis->scaled ? cfg.scale_factor : 1);
+    requisition->height = svis->height*(svis->scaled ? cfg.scale_factor : 1);
 }
 
 static void ui_svis_size_allocate(GtkWidget *widget, GtkAllocation *allocation) {
     UiSVis *svis = UI_SVIS (widget);
 
     widget->allocation = *allocation;
-    widget->allocation.x *= (1+svis->scaled);
-    widget->allocation.y *= (1+svis->scaled);
+    widget->allocation.x *= (svis->scaled ? cfg.scale_factor : 1 );
+    widget->allocation.y *= (svis->scaled ? cfg.scale_factor : 1);
     if (GTK_WIDGET_REALIZED (widget))
     {
         if (svis->event_window != NULL)
@@ -352,7 +352,7 @@
         }
 
     }
-    else {   /*            svis scaling is disabled for now 
+    else {            /*svis scaling, this needs some work, since a lot of stuff is hardcoded --majeru*/
 
       memset(rgb_data, 0, SVIS_WIDTH * cfg.scale_factor * SVIS_HEIGHT * cfg.scale_factor);
       if (cfg.vis_type == VIS_ANALYZER && !playback_get_paused() && playback_get_playing()){
@@ -418,7 +418,7 @@
             }
         }
 
-*/
+
     }
 
     GdkPixmap *obj = NULL;