[gnome-control-center] background: Avoid the size changing when changing preview
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Avoid the size changing when changing preview
- Date: Thu, 16 Dec 2010 18:38:21 +0000 (UTC)
commit 59f84a70888c9e9c368c913fbc12cbfcf927aa56
Author: Bastien Nocera <hadess hadess net>
Date: Thu Dec 16 13:04:10 2010 +0000
background: Avoid the size changing when changing preview
The gnome_wp_item_update_size() code was working off old data.
We need to copy the height and width as well if we want it to
match the current background. The next call to _update_size()
will fill in ->size if it wasn't already set.
panels/background/cc-background-panel.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 25d830f..81ffa04 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -368,6 +368,9 @@ update_preview (CcBackgroundPanelPrivate *priv,
priv->current_background->options = item->options;
priv->current_background->shade_type = item->shade_type;
+ priv->current_background->height = item->height;
+ priv->current_background->width = item->width;
+
gnome_wp_item_ensure_gnome_bg (priv->current_background);
gnome_wp_item_update_size (priv->current_background, priv->thumb_factory);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]