Mercurial > audlegacy
comparison src/audacious/ui_svis.c @ 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 | f1074a07ec09 |
| children | de33c83aa06f |
comparison
equal
deleted
inserted
replaced
| 4219:8a848179e244 | 4220:e6ef8287d115 |
|---|---|
| 240 } | 240 } |
| 241 | 241 |
| 242 static void ui_svis_size_request(GtkWidget *widget, GtkRequisition *requisition) { | 242 static void ui_svis_size_request(GtkWidget *widget, GtkRequisition *requisition) { |
| 243 UiSVis *svis = UI_SVIS(widget); | 243 UiSVis *svis = UI_SVIS(widget); |
| 244 | 244 |
| 245 requisition->width = svis->width*(1+svis->scaled); | 245 requisition->width = svis->width * (svis->scaled ? cfg.scale_factor : 1); |
| 246 requisition->height = svis->height*(1+svis->scaled); | 246 requisition->height = svis->height*(svis->scaled ? cfg.scale_factor : 1); |
| 247 } | 247 } |
| 248 | 248 |
| 249 static void ui_svis_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { | 249 static void ui_svis_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { |
| 250 UiSVis *svis = UI_SVIS (widget); | 250 UiSVis *svis = UI_SVIS (widget); |
| 251 | 251 |
| 252 widget->allocation = *allocation; | 252 widget->allocation = *allocation; |
| 253 widget->allocation.x *= (1+svis->scaled); | 253 widget->allocation.x *= (svis->scaled ? cfg.scale_factor : 1 ); |
| 254 widget->allocation.y *= (1+svis->scaled); | 254 widget->allocation.y *= (svis->scaled ? cfg.scale_factor : 1); |
| 255 if (GTK_WIDGET_REALIZED (widget)) | 255 if (GTK_WIDGET_REALIZED (widget)) |
| 256 { | 256 { |
| 257 if (svis->event_window != NULL) | 257 if (svis->event_window != NULL) |
| 258 gdk_window_move_resize(svis->event_window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height); | 258 gdk_window_move_resize(svis->event_window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height); |
| 259 else | 259 else |
| 350 *ptr = svis_scope_colors[h]; | 350 *ptr = svis_scope_colors[h]; |
| 351 } | 351 } |
| 352 } | 352 } |
| 353 | 353 |
| 354 } | 354 } |
| 355 else { /* svis scaling is disabled for now | 355 else { /*svis scaling, this needs some work, since a lot of stuff is hardcoded --majeru*/ |
| 356 | 356 |
| 357 memset(rgb_data, 0, SVIS_WIDTH * cfg.scale_factor * SVIS_HEIGHT * cfg.scale_factor); | 357 memset(rgb_data, 0, SVIS_WIDTH * cfg.scale_factor * SVIS_HEIGHT * cfg.scale_factor); |
| 358 if (cfg.vis_type == VIS_ANALYZER && !playback_get_paused() && playback_get_playing()){ | 358 if (cfg.vis_type == VIS_ANALYZER && !playback_get_paused() && playback_get_playing()){ |
| 359 for(y=0; y < SVIS_HEIGHT; y++){ | 359 for(y=0; y < SVIS_HEIGHT; y++){ |
| 360 if (cfg.analyzer_type == ANALYZER_BARS){ | 360 if (cfg.analyzer_type == ANALYZER_BARS){ |
| 416 *(ptr + 76) = svis_scope_colors[h]; | 416 *(ptr + 76) = svis_scope_colors[h]; |
| 417 *(ptr + 77) = svis_scope_colors[h]; | 417 *(ptr + 77) = svis_scope_colors[h]; |
| 418 } | 418 } |
| 419 } | 419 } |
| 420 | 420 |
| 421 */ | 421 |
| 422 } | 422 } |
| 423 | 423 |
| 424 GdkPixmap *obj = NULL; | 424 GdkPixmap *obj = NULL; |
| 425 GdkGC *gc; | 425 GdkGC *gc; |
| 426 obj = gdk_pixmap_new(NULL, svis->width* ( svis->scaled ? cfg.scale_factor : 1), | 426 obj = gdk_pixmap_new(NULL, svis->width* ( svis->scaled ? cfg.scale_factor : 1), |
