Tweak geometry settings
2001-07-26 Bradford Hovinen <hovinen@ximian.com> * applier.c (get_geometry): Tweak geometry settings
This commit is contained in:
parent
4e0ca4cae4
commit
804c0a33d5
2 changed files with 8 additions and 10 deletions
|
@ -1,7 +1,6 @@
|
||||||
2001-07-26 Bradford Hovinen <hovinen@ximian.com>
|
2001-07-26 Bradford Hovinen <hovinen@ximian.com>
|
||||||
|
|
||||||
* applier.c (renderer_render_wallpaper): Make sure not to scale
|
* applier.c (get_geometry): Tweak geometry settings
|
||||||
the pixbuf if the wallpaper type is centered
|
|
||||||
|
|
||||||
* background-properties-capplet.c (property_change_cb): Accept
|
* background-properties-capplet.c (property_change_cb): Accept
|
||||||
applier as argument; retrieve property bag from applier
|
applier as argument; retrieve property bag from applier
|
||||||
|
|
|
@ -872,9 +872,8 @@ renderer_render_wallpaper (Renderer *renderer)
|
||||||
PDEBUG (renderer->pixbuf);
|
PDEBUG (renderer->pixbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (renderer->prefs->wallpaper_type != WPTYPE_CENTERED &&
|
else if (renderer->wwidth != renderer->pwidth ||
|
||||||
(renderer->wwidth != renderer->pwidth ||
|
renderer->wheight != renderer->pheight)
|
||||||
renderer->wheight != renderer->pheight))
|
|
||||||
{
|
{
|
||||||
if (render_gradient_p (renderer, renderer->prefs)) {
|
if (render_gradient_p (renderer, renderer->prefs)) {
|
||||||
scalex = (gdouble) renderer->wwidth /
|
scalex = (gdouble) renderer->wwidth /
|
||||||
|
@ -1136,13 +1135,13 @@ get_geometry (wallpaper_type_t wallpaper_type, GdkPixbuf *pixbuf,
|
||||||
if (vwidth < gdk_pixbuf_get_width (pixbuf) &&
|
if (vwidth < gdk_pixbuf_get_width (pixbuf) &&
|
||||||
wallpaper_type == WPTYPE_CENTERED)
|
wallpaper_type == WPTYPE_CENTERED)
|
||||||
{
|
{
|
||||||
*srcx = (gdk_pixbuf_get_width (pixbuf) - vwidth) / 2;
|
*srcx = (gdk_pixbuf_get_width (pixbuf) - vwidth) * factor / 2;
|
||||||
*rwidth = dwidth;
|
*rwidth = (gdouble) gdk_pixbuf_get_width (pixbuf) * factor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*srcx = 0;
|
*srcx = 0;
|
||||||
*rwidth = gdk_pixbuf_get_width (pixbuf) * factor;
|
*rwidth = (gdouble) gdk_pixbuf_get_width (pixbuf) * factor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dheight != vheight)
|
if (dheight != vheight)
|
||||||
|
@ -1154,8 +1153,8 @@ get_geometry (wallpaper_type_t wallpaper_type, GdkPixbuf *pixbuf,
|
||||||
if (vheight < gdk_pixbuf_get_height (pixbuf) &&
|
if (vheight < gdk_pixbuf_get_height (pixbuf) &&
|
||||||
wallpaper_type == WPTYPE_CENTERED)
|
wallpaper_type == WPTYPE_CENTERED)
|
||||||
{
|
{
|
||||||
*srcy = (gdk_pixbuf_get_height (pixbuf) - vheight) / 2;
|
*srcy = (gdk_pixbuf_get_height (pixbuf) - vheight) * factor / 2;
|
||||||
*rheight = dheight;
|
*rheight = gdk_pixbuf_get_height (pixbuf) * factor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue