Use vwidth and vheight rather than dwidth and dheight when computing
2001-07-19 Bradford Hovinen <hovinen@ximian.com> * applier.c (get_geometry): Use vwidth and vheight rather than dwidth and dheight when computing aspect ratio (get_geometry): Adjust rwidth and rheight according to above change * preferences.c (preferences_changed): Disable auto-apply * background-properties.glade: Remove apply automatically check button; change "More Solid" to "More Opaque"
This commit is contained in:
parent
0c67fab221
commit
6c78ff23c8
4 changed files with 20 additions and 35 deletions
|
@ -1,3 +1,14 @@
|
||||||
|
2001-07-19 Bradford Hovinen <hovinen@ximian.com>
|
||||||
|
|
||||||
|
* applier.c (get_geometry): Use vwidth and vheight rather than
|
||||||
|
dwidth and dheight when computing aspect ratio
|
||||||
|
(get_geometry): Adjust rwidth and rheight according to above change
|
||||||
|
|
||||||
|
* preferences.c (preferences_changed): Disable auto-apply
|
||||||
|
|
||||||
|
* background-properties.glade: Remove apply automatically check
|
||||||
|
button; change "More Solid" to "More Opaque"
|
||||||
|
|
||||||
2001-07-17 Chema Celorio <chema@celorio.com>
|
2001-07-17 Chema Celorio <chema@celorio.com>
|
||||||
|
|
||||||
* start
|
* start
|
||||||
|
|
|
@ -1126,21 +1126,21 @@ get_geometry (wallpaper_type_t wallpaper_type, GdkPixbuf *pixbuf,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WPTYPE_SCALED_ASPECT:
|
case WPTYPE_SCALED_ASPECT:
|
||||||
asp = (gdouble) gdk_pixbuf_get_width (pixbuf) / dwidth;
|
asp = (gdouble) gdk_pixbuf_get_width (pixbuf) / vwidth;
|
||||||
|
|
||||||
if (asp < (gdouble) gdk_pixbuf_get_height (pixbuf) / dheight) {
|
if (asp < (gdouble) gdk_pixbuf_get_height (pixbuf) / vheight) {
|
||||||
asp = (gdouble)
|
asp = (gdouble)
|
||||||
gdk_pixbuf_get_height (pixbuf) / dheight;
|
gdk_pixbuf_get_height (pixbuf) / vheight;
|
||||||
st = 1;
|
st = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (st) {
|
if (st) {
|
||||||
*rwidth = gdk_pixbuf_get_width (pixbuf) / asp;
|
*rwidth = gdk_pixbuf_get_width (pixbuf) / asp / vwidth * dwidth;
|
||||||
*rheight = dheight;
|
*rheight = dheight;
|
||||||
*xoffset = (dwidth - *rwidth) >> 1;
|
*xoffset = (dwidth - *rwidth) >> 1;
|
||||||
*yoffset = 0;
|
*yoffset = 0;
|
||||||
} else {
|
} else {
|
||||||
*rheight = gdk_pixbuf_get_height (pixbuf) / asp;
|
*rheight = gdk_pixbuf_get_height (pixbuf) / asp / vheight * dheight;
|
||||||
*rwidth = dwidth;
|
*rwidth = dwidth;
|
||||||
*xoffset = 0;
|
*xoffset = 0;
|
||||||
*yoffset = (dheight - *rheight) >> 1;
|
*yoffset = (dheight - *rheight) >> 1;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkTable</class>
|
<class>GtkTable</class>
|
||||||
<name>prefs_widget</name>
|
<name>prefs_widget</name>
|
||||||
<rows>4</rows>
|
<rows>3</rows>
|
||||||
<columns>2</columns>
|
<columns>2</columns>
|
||||||
<homogeneous>False</homogeneous>
|
<homogeneous>False</homogeneous>
|
||||||
<row_spacing>5</row_spacing>
|
<row_spacing>5</row_spacing>
|
||||||
|
@ -252,34 +252,6 @@ Horizontal Gradient
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
|
||||||
<class>GtkCheckButton</class>
|
|
||||||
<name>auto_apply</name>
|
|
||||||
<can_focus>True</can_focus>
|
|
||||||
<signal>
|
|
||||||
<name>toggled</name>
|
|
||||||
<handler>auto_apply_toggled_cb</handler>
|
|
||||||
<last_modification_time>Thu, 21 Dec 2000 19:52:25 GMT</last_modification_time>
|
|
||||||
</signal>
|
|
||||||
<label>Apply changes automatically</label>
|
|
||||||
<active>False</active>
|
|
||||||
<draw_indicator>True</draw_indicator>
|
|
||||||
<child>
|
|
||||||
<left_attach>0</left_attach>
|
|
||||||
<right_attach>2</right_attach>
|
|
||||||
<top_attach>3</top_attach>
|
|
||||||
<bottom_attach>4</bottom_attach>
|
|
||||||
<xpad>0</xpad>
|
|
||||||
<ypad>0</ypad>
|
|
||||||
<xexpand>False</xexpand>
|
|
||||||
<yexpand>False</yexpand>
|
|
||||||
<xshrink>False</xshrink>
|
|
||||||
<yshrink>False</yshrink>
|
|
||||||
<xfill>True</xfill>
|
|
||||||
<yfill>False</yfill>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkFrame</class>
|
<class>GtkFrame</class>
|
||||||
<name>wallpaper_frame</name>
|
<name>wallpaper_frame</name>
|
||||||
|
@ -529,7 +501,7 @@ Stretched (change aspect ratio)
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkLabel</class>
|
<class>GtkLabel</class>
|
||||||
<name>label9</name>
|
<name>label9</name>
|
||||||
<label>More Solid</label>
|
<label>More Opaque</label>
|
||||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||||
<wrap>False</wrap>
|
<wrap>False</wrap>
|
||||||
<xalign>0.5</xalign>
|
<xalign>0.5</xalign>
|
||||||
|
|
|
@ -326,10 +326,12 @@ preferences_changed (Preferences *prefs)
|
||||||
if (prefs->timeout_id)
|
if (prefs->timeout_id)
|
||||||
gtk_timeout_remove (prefs->timeout_id);
|
gtk_timeout_remove (prefs->timeout_id);
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (prefs->auto_apply)
|
if (prefs->auto_apply)
|
||||||
prefs->timeout_id =
|
prefs->timeout_id =
|
||||||
gtk_timeout_add
|
gtk_timeout_add
|
||||||
(2000, (GtkFunction) apply_timeout_cb, prefs);
|
(2000, (GtkFunction) apply_timeout_cb, prefs);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
applier_apply_prefs (applier, prefs, FALSE, TRUE);
|
applier_apply_prefs (applier, prefs, FALSE, TRUE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue