[gnome-control-center/wip/jsparber/background: 32/58] [minor] display small preview on default



commit 1babb7c39dc4c7a9349765313cea3b860684be57
Author: Julian Sparber <julian sparber net>
Date:   Tue Nov 7 16:00:00 2017 +0100

    [minor] display small preview on default

 panels/background/cc-background-panel.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 5607317..309d03a 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -202,12 +202,14 @@ on_preview_draw (GtkWidget         *widget,
 
   const gint width = gtk_widget_get_allocated_width (panel);
   const gint height = gtk_widget_get_allocated_height (panel);
-  if (height < 500) {
+  g_print ("Window height: %d\n", height);
+  if (height < 700) {
     gtk_widget_set_size_request (widget, 200, 200*9/16);
   }
 
-  else if (height > 500) {
+  else if (height > 700) {
     gtk_widget_set_size_request (widget, 310, 170);
+    g_object_set_data_full (G_OBJECT (panel->current_background), "pixbuf", NULL, g_object_unref);
   }
 
   pixbuf = get_or_create_cached_pixbuf (panel,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]