[gnome-clocks/wip/cityimages] Add scrolled window



commit aec01edf24f3d667c89c4528bff82184463142ef
Author: Evgeny Bobkin <evgen ibqn gmail com>
Date:   Fri Sep 13 17:20:07 2013 +0200

    Add scrolled window

 src/world.vala |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/src/world.vala b/src/world.vala
index 85edb65..a4b4546 100644
--- a/src/world.vala
+++ b/src/world.vala
@@ -270,13 +270,15 @@ private class StandalonePanel : Gtk.EventBox {
         sunset_label = builder.get_object ("sunset_label") as Gtk.Label;
 
         var overlay = new Gtk.Overlay ();
+        var scrolled_window = new Gtk.ScrolledWindow (null, null);
         city_image = new Gtk.Image ();
-        city_image.halign = Gtk.Align.FILL;
-        city_image.valign = Gtk.Align.FILL;
-        overlay.add (city_image);
+        //city_image.halign = Gtk.Align.FILL;
+        //city_image.valign = Gtk.Align.FILL;
+        scrolled_window.add (city_image);
+        overlay.add (scrolled_window);
         overlay.add_overlay (grid);
-
-        city_image.size_allocate.connect (on_size_allocate);
+    fuck
+        //city_image.size_allocate.connect (on_size_allocate);
 
         add (overlay);
     }
@@ -288,6 +290,7 @@ private class StandalonePanel : Gtk.EventBox {
             sunrise_label.label = location.sunrise_label;
             sunset_label.label = location.sunset_label;
 
+            return;
             if (location.is_daytime) {
                 city_image.set_from_pixbuf (day_pixbuf);
             } else {
@@ -297,13 +300,13 @@ private class StandalonePanel : Gtk.EventBox {
     }
 
     public void on_size_allocate (Gtk.Allocation rectangle) {
-        day_pixbuf = location.day_pixbuf.scale_simple (rectangle.width, rectangle.height, 
Gdk.InterpType.BILINEAR);
-        night_pixbuf = location.night_pixbuf.scale_simple (rectangle.width, rectangle.height, 
Gdk.InterpType.BILINEAR);
+        //day_pixbuf = location.day_pixbuf.scale_simple (rectangle.width, rectangle.height, 
Gdk.InterpType.BILINEAR);
+        //night_pixbuf = location.night_pixbuf.scale_simple (rectangle.width, rectangle.height, 
Gdk.InterpType.BILINEAR);
 
         if (location.is_daytime) {
-            city_image.set_from_pixbuf (day_pixbuf);
+            //city_image.set_from_pixbuf (day_pixbuf);
         } else {
-            city_image.set_from_pixbuf (night_pixbuf);
+            //city_image.set_from_pixbuf (night_pixbuf);
         }
     }
 }


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