[gnome-mines/wip/theming-support] Various theme selector styling fixes



commit f8222fe88c593137a143b0c469d067ef7fa6a7bd
Author: Robert Roth <robert roth off gmail com>
Date:   Sun Jan 11 00:14:39 2015 +0200

    Various theme selector styling fixes

 data/gnome-mines.css           |    6 ++++--
 src/theme-selector-dialog.vala |   36 +++++++++++++++++++++++-------------
 2 files changed, 27 insertions(+), 15 deletions(-)
---
diff --git a/data/gnome-mines.css b/data/gnome-mines.css
index 3e57f72..629f9a3 100644
--- a/data/gnome-mines.css
+++ b/data/gnome-mines.css
@@ -10,7 +10,9 @@
 }
 
 .navigation {
-  border-radius:16px;
-  background-color:alpha(#888a85, 0.6);
+  border-radius:32px;
+  background-color:alpha(#888a85, 0.1);
+  border-width:0px;
+  border-color:#BABABA;
   background-image:none;
 }
diff --git a/src/theme-selector-dialog.vala b/src/theme-selector-dialog.vala
index ce5c588..9211618 100644
--- a/src/theme-selector-dialog.vala
+++ b/src/theme-selector-dialog.vala
@@ -39,20 +39,30 @@ public class ThemeSelectorDialog : Gtk.Dialog
         string themes_dir = Path.build_path (Path.DIR_SEPARATOR_S, DATA_DIRECTORY, "themes");
         List<string> themes = new List<string> ();
         File file = File.new_for_path (themes_dir);
-        FileEnumerator enumerator = file.enumerate_children ("standard::*",
-                                                              FileQueryInfoFlags.NOFOLLOW_SYMLINKS,
-                                                              null);
-
-        FileInfo info = null;
-        while ((info = enumerator.next_file (null)) != null) {
-            if (info.get_file_type () == FileType.DIRECTORY) {
-                themes.append (info.get_name ());
+
+        try
+        {
+            FileEnumerator enumerator = file.enumerate_children ("standard::*",
+                                                                  FileQueryInfoFlags.NOFOLLOW_SYMLINKS,
+                                                                  null);
+
+            FileInfo info = null;
+
+            while ((info = enumerator.next_file (null)) != null) {
+                if (info.get_file_type () == FileType.DIRECTORY) {
+                    themes.append (info.get_name ());
+                }
             }
         }
+        catch (Error e)
+        {
+            error ("Error enumerating themes from directory %s : %s\n", themes_dir, e.message);
+        }
         return themes;
     }
 
-    private Gtk.Widget create_preview_widget (out MinefieldView view) {
+    private Gtk.Widget create_preview_widget (out MinefieldView view)
+    {
         view = new MinefieldView (settings);
         view.minefield = new PreviewField ();
 
@@ -72,14 +82,14 @@ public class ThemeSelectorDialog : Gtk.Dialog
         var overlay = new Gtk.Overlay ();
         get_content_area ().pack_start (overlay, true, true, 0);
 
-        previous = new Gtk.Button.from_icon_name ("go-previous", Gtk.IconSize.LARGE_TOOLBAR);
+        previous = new Gtk.Button.from_icon_name ("go-previous-symbolic", Gtk.IconSize.LARGE_TOOLBAR);
         previous.show ();
         previous.valign = Gtk.Align.CENTER;
         previous.halign = Gtk.Align.START;
         previous.get_style_context ().add_class ("navigation");
         overlay.add_overlay (previous);
 
-        next = new Gtk.Button.from_icon_name ("go-next", Gtk.IconSize.LARGE_TOOLBAR);
+        next = new Gtk.Button.from_icon_name ("go-next-symbolic", Gtk.IconSize.LARGE_TOOLBAR);
         next.show ();
         next.valign = Gtk.Align.CENTER;
         next.halign = Gtk.Align.END;
@@ -118,8 +128,8 @@ public class ThemeSelectorDialog : Gtk.Dialog
         update_sensitivities (themes, current_index);
         overlay.show_all ();
 
-        set_size_request (320, 300);
-//        resizable = false;
+        set_size_request (350, 300);
+        resizable = false;
     }
 
     private void switch_theme_preview (int to_index, List<string> themes)


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