mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
fix bug I introduced in case where scaling was done in both directions.
2002-11-04 Havoc Pennington <hp@pobox.com> * src/theme.c (scale_and_alpha_pixbuf): fix bug I introduced in case where scaling was done in both directions.
This commit is contained in:
parent
5efd276a22
commit
77349f6878
@ -1,3 +1,8 @@
|
|||||||
|
2002-11-04 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/theme.c (scale_and_alpha_pixbuf): fix bug I introduced in
|
||||||
|
case where scaling was done in both directions.
|
||||||
|
|
||||||
2002-11-04 Havoc Pennington <hp@pobox.com>
|
2002-11-04 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
Patch from Brian Cameron to implement the vertical/horizontal
|
Patch from Brian Cameron to implement the vertical/horizontal
|
||||||
|
20
src/theme.c
20
src/theme.c
@ -2918,20 +2918,24 @@ scale_and_alpha_pixbuf (GdkPixbuf *src,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int src_h, src_w, dest_h, dest_w, pixbuf_width, pixbuf_height;
|
int src_h, src_w, dest_h, dest_w;
|
||||||
src_h = gdk_pixbuf_get_height (src);
|
src_h = gdk_pixbuf_get_height (src);
|
||||||
src_w = gdk_pixbuf_get_width (src);
|
src_w = gdk_pixbuf_get_width (src);
|
||||||
|
|
||||||
if (vertical_stripes)
|
/* prefer to replicate_cols if possible, as that
|
||||||
{
|
* is faster (no memory reads)
|
||||||
dest_w = width;
|
*/
|
||||||
dest_h = gdk_pixbuf_get_height (src);
|
if (horizontal_stripes)
|
||||||
}
|
|
||||||
else if (horizontal_stripes)
|
|
||||||
{
|
{
|
||||||
dest_w = gdk_pixbuf_get_width (src);
|
dest_w = gdk_pixbuf_get_width (src);
|
||||||
dest_h = height;
|
dest_h = height;
|
||||||
}
|
}
|
||||||
|
else if (vertical_stripes)
|
||||||
|
{
|
||||||
|
dest_w = width;
|
||||||
|
dest_h = gdk_pixbuf_get_height (src);
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dest_w = width;
|
dest_w = width;
|
||||||
@ -2941,7 +2945,7 @@ scale_and_alpha_pixbuf (GdkPixbuf *src,
|
|||||||
if (dest_w == src_w && dest_h == src_h)
|
if (dest_w == src_w && dest_h == src_h)
|
||||||
{
|
{
|
||||||
temp_pixbuf = src;
|
temp_pixbuf = src;
|
||||||
g_object_ref (G_OBJECT (tmp_pixbuf));
|
g_object_ref (G_OBJECT (temp_pixbuf));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user