[baobab/wip/grid-layout] Tweak the location widget



commit f16381a9a03b4fca22cf1e48764e18c7a059e0c0
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Thu Apr 12 15:09:55 2012 +0200

    Tweak the location widget

 src/baobab-location-widget.vala |   18 ++++++++++--------
 src/baobab.css                  |    8 +++++---
 2 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/src/baobab-location-widget.vala b/src/baobab-location-widget.vala
index b4bca6b..c230b15 100644
--- a/src/baobab-location-widget.vala
+++ b/src/baobab-location-widget.vala
@@ -124,7 +124,7 @@ namespace Baobab {
 
     public abstract class BaseLocationWidget : Gtk.Grid {
 
-        protected const int ICON_SIZE = 128;
+        protected const int ICON_SIZE = 48;
 
         protected static Gtk.SizeGroup name_size_group = null;
         protected static Gtk.SizeGroup mount_point_size_group = null;
@@ -186,21 +186,23 @@ namespace Baobab {
             var icon_theme = Gtk.IconTheme.get_default ();
             var icon_info = icon_theme.lookup_by_gicon (location.icon, BaseLocationWidget.ICON_SIZE, 0);
 
+            var info_grid = new Gtk.Grid ();
+
             try {
                 var pixbuf = icon_info.load_icon ();
                 var image = new Gtk.Image.from_pixbuf (pixbuf);
-                attach (image, 0, 0, 1, 1);
+                info_grid.attach (image, 1, -1, 1, 1);
             } catch (Error e) {
                 warning ("Failed to load icon %s: %s", location.icon.to_string(), e.message);
             }
 
             var label = new Gtk.Label (location.name);
-            //label.xalign = 0;
-            name_size_group.add_widget (label);
-            attach (label, 0, 1, 1, 1);
+            label.set_markup ("<b>" + location.name + "</b>");
+            label.xalign = 0;
+            //name_size_group.add_widget (label);
+            info_grid.attach (label, 2, -1, 1, 1);
 
 
-            var info_grid = new Gtk.Grid ();
             info_grid.column_spacing = 10;
             info_grid.row_spacing = 6;
             info_grid.valign = Gtk.Align.CENTER;
@@ -248,7 +250,7 @@ namespace Baobab {
             mount_point_size_group.add_widget (label);
             info_grid.attach (label, 2, 2, 1, 1);
 
-            attach (info_grid, 1, 0, 1, 1);
+            attach (info_grid, 0, 1, 1, 1);
 
             //size_size_group.add_widget (label);
             //add (label);
@@ -258,7 +260,7 @@ namespace Baobab {
             button.valign = Gtk.Align.CENTER;
             button.halign = Gtk.Align.END;
             button_size_group.add_widget (button);
-            attach (button, 1, 1, 1, 1);
+            attach (button, 0, 2, 1, 1);
 
             button.clicked.connect (() => { action (location); });
 
diff --git a/src/baobab.css b/src/baobab.css
index 38350c6..f7d4411 100644
--- a/src/baobab.css
+++ b/src/baobab.css
@@ -1,6 +1,8 @@
 BaobabBaseLocationWidget.frame {
-    /*border-color: #ff0000;*/
-    border-width: 1px;
+    /*border-color: transparent;
+    border-image: -gtk-gradient (linear, left top, left bottom, from (#000000), to (#ffffff)) 1 0 0 0;
     border-style: solid;
-    border-radius : 4px;
+    border-width: 4px;*/
+    border-radius : 6px;
+    background-color: #ffffdf;
 }



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