[eog] Possibly delete the SVG background when changing the background color
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Possibly delete the SVG background when changing the background color
- Date: Thu, 3 Jun 2010 21:09:12 +0000 (UTC)
commit c8c35a264eddbc68197d76dc58de17960ec5366d
Author: Felix Riemann <friemann gnome org>
Date: Thu Jun 3 23:06:04 2010 +0200
Possibly delete the SVG background when changing the background color
If the transparency is set to show the viewing area's background color
while changing the area's color the SVG background needs to be updated.
To achieve this it's simply deleted. The next redraw, which will be
triggered by changing the view's background color, will recreate it.
src/eog-scroll-view.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index d258739..f2303ec 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -2558,11 +2558,18 @@ _eog_scroll_view_update_bg_color (EogScrollView *view)
selected = (priv->override_bg_color) ? priv->override_bg_color
: priv->background_color;
+
+ if (priv->transp_style == EOG_TRANSP_BACKGROUND
+ && priv->background_surface != NULL) {
+ /* Delete the SVG background to have it recreated with
+ * the correct color during the next SVG redraw */
+ cairo_surface_destroy (priv->background_surface);
+ priv->background_surface = NULL;
+ }
+
gtk_widget_modify_bg (GTK_WIDGET (view),
GTK_STATE_NORMAL,
selected);
-
-
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]