comparison src/buddyicon.c @ 10483:748aa3c6de36

[gaim-migrate @ 11773] scaling for the buddy icons in the tooltips, and whatever else decided to sneak in on this commit committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 08 Jan 2005 07:25:37 +0000
parents a66cf83552dc
children f5c9438982f8
comparison
equal deleted inserted replaced
10482:1ac8f10ce68d 10483:748aa3c6de36
449 void 449 void
450 gaim_buddy_icons_uninit() 450 gaim_buddy_icons_uninit()
451 { 451 {
452 g_hash_table_destroy(account_cache); 452 g_hash_table_destroy(account_cache);
453 } 453 }
454
455 void gaim_buddy_icon_get_scale_size(GaimBuddyIconSpec *spec, int *width, int *height)
456 {
457 /* this should eventually get smarter about preserving the aspect
458 * ratio when scaling, but gimmie a break, I just woke up */
459 if(spec && spec->scale_rules & GAIM_ICON_SCALE_DISPLAY) {
460 if(*width < spec->min_width)
461 *width = spec->min_width;
462 else if(*width > spec->max_width)
463 *width = spec->max_width;
464
465 if(*height < spec->min_height)
466 *height = spec->min_height;
467 else if(*height > spec->max_height)
468 *height = spec->max_height;
469 }
470 }
471