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:
Bradford Hovinen 2001-07-19 14:44:47 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent 0c67fab221
commit 6c78ff23c8
4 changed files with 20 additions and 35 deletions

View file

@ -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>
* start

View file

@ -1126,21 +1126,21 @@ get_geometry (wallpaper_type_t wallpaper_type, GdkPixbuf *pixbuf,
break;
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)
gdk_pixbuf_get_height (pixbuf) / dheight;
gdk_pixbuf_get_height (pixbuf) / vheight;
st = 1;
}
if (st) {
*rwidth = gdk_pixbuf_get_width (pixbuf) / asp;
*rwidth = gdk_pixbuf_get_width (pixbuf) / asp / vwidth * dwidth;
*rheight = dheight;
*xoffset = (dwidth - *rwidth) >> 1;
*yoffset = 0;
} else {
*rheight = gdk_pixbuf_get_height (pixbuf) / asp;
*rheight = gdk_pixbuf_get_height (pixbuf) / asp / vheight * dheight;
*rwidth = dwidth;
*xoffset = 0;
*yoffset = (dheight - *rheight) >> 1;

View file

@ -26,7 +26,7 @@
<widget>
<class>GtkTable</class>
<name>prefs_widget</name>
<rows>4</rows>
<rows>3</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>5</row_spacing>
@ -252,34 +252,6 @@ Horizontal Gradient
</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>
<class>GtkFrame</class>
<name>wallpaper_frame</name>
@ -529,7 +501,7 @@ Stretched (change aspect ratio)
<widget>
<class>GtkLabel</class>
<name>label9</name>
<label>More Solid</label>
<label>More Opaque</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>

View file

@ -326,10 +326,12 @@ preferences_changed (Preferences *prefs)
if (prefs->timeout_id)
gtk_timeout_remove (prefs->timeout_id);
#if 0
if (prefs->auto_apply)
prefs->timeout_id =
gtk_timeout_add
(2000, (GtkFunction) apply_timeout_cb, prefs);
#endif
}
applier_apply_prefs (applier, prefs, FALSE, TRUE);