diff options
author | Iain Holmes <iain@src.gnome.org> | 2007-11-19 21:19:01 +0000 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2007-11-19 21:19:01 +0000 |
commit | 06fd56f3591b9b54a2d2a7187194bc15a2dacd4e (patch) | |
tree | 259e76615d7f258e486a6ea334870a267b692775 | |
parent | 411aea0b6760885fb0948343c3a2900287dd1489 (diff) | |
download | metacity-06fd56f3591b9b54a2d2a7187194bc15a2dacd4e.tar.gz |
Make the scale size 150 px
svn path=/branches/iains-blingtastic-bucket-o-bling/; revision=3419
-rw-r--r-- | src/screen.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/screen.c b/src/screen.c index a6fe675b..d0033ecb 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1230,6 +1230,8 @@ meta_screen_update_cursor (MetaScreen *screen) XFreeCursor (screen->display->xdisplay, xcursor); } +#define MAX_PREVIEW_SIZE 150.0 + static GdkPixbuf * get_window_pixbuf (MetaWindow *window) { @@ -1251,17 +1253,17 @@ get_window_pixbuf (MetaWindow *window) width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); - /* Scale pixbuf to max width 100 */ + /* Scale pixbuf to max dimension MAX_PREVIEW_SIZE */ if (width > height) { - ratio = ((double) width) / 100.0; - width = 100; + ratio = ((double) width) / MAX_PREVIEW_SIZE; + width = (int) MAX_PREVIEW_SIZE; height = (int) (((double) height) / ratio); } else { - ratio = ((double) height) / 100.0; - height = 100; + ratio = ((double) height) / MAX_PREVIEW_SIZE; + height = (int) MAX_PREVIEW_SIZE; width = (int) (((double) width) / ratio); } |