[gnome-sound-recorder] application.css, mainWindow.css: theming changes



commit aae62a921b52bada5fee2f92faaee4927b92cd48
Author: Meg Ford <meg387 gmail com>
Date:   Mon Jan 27 23:46:48 2014 -0600

    application.css, mainWindow.css: theming changes
    
    Follow the clocks template for theming the empty listview.

 data/application.css |    4 ++++
 src/mainWindow.js    |   28 +++++++++++++++++-----------
 2 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/data/application.css b/data/application.css
index dd87e66..409589a 100644
--- a/data/application.css
+++ b/data/application.css
@@ -18,3 +18,7 @@
 .view .toolbarEnd:dir(rtl) {
   border-right: rgba(255,255,255,0.45) 1px solid; 
 }
+
+.emptyGrid {
+   background-color: @theme_bg_color;
+}
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 0dffbf0..815a31d 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -140,17 +140,22 @@ const MainView = new Lang.Class({
                                         valign: Gtk.Align.CENTER });
         this._scrolledWin.add(this.emptyGrid);
 
-        this.emptyGrid.add(new Gtk.Image({ icon_name: 'audio-input-microphone-symbolic',
-                                           icon_size: Gtk.IconSize.LARGE_TOOLBAR }));
-        this.emptyGrid.add(new Gtk.Label({ name: 'emptyPage-title',
-                                           label: _("Add Recordings"),
-                                           halign: Gtk.Align.CENTER,
-                                           valign: Gtk.Align.CENTER }));
-        this.emptyGrid.add(new Gtk.Label({ label: _("Use the <b>Record</b> button to make sound recordings"),
-                                           use_markup: true,
-                                           max_width_chars: 30,
-                                           halign: Gtk.Align.CENTER,
-                                           valign: Gtk.Align.CENTER }));
+        let emptyPageImage = new Gtk.Image({ icon_name: 'audio-input-microphone-symbolic',
+                                             icon_size: Gtk.IconSize.LARGE_TOOLBAR });
+        emptyPageImage.get_style_context().add_class('dim-label');
+        this.emptyGrid.add(emptyPageImage);
+        let emptyPageTitle = new Gtk.Label({ label: _("Add Recordings"),
+                                             halign: Gtk.Align.CENTER,
+                                             valign: Gtk.Align.CENTER });
+        emptyPageTitle.get_style_context().add_class('dim-label');
+        this.emptyGrid.add(emptyPageTitle);
+        let emptyPageDirections = new Gtk.Label({ label: _("Use the <b>Record</b> button to make sound 
recordings"),
+                                                  use_markup: true,
+                                                  max_width_chars: 30,
+                                                  halign: Gtk.Align.CENTER,
+                                                  valign: Gtk.Align.CENTER });
+        emptyPageDirections.get_style_context().add_class('dim-label');
+        this.emptyGrid.add(emptyPageDirections);
         this.emptyGrid.show_all();
     },        
     
@@ -320,6 +325,7 @@ const MainView = new Lang.Class({
         this._endIdx = offsetController.getEndIdx();
         
         if (this._endIdx == -1) {
+            this._scrolledWin.get_style_context().add_class('emptyGrid');
             this._addEmptyPage();
         } else {       
             this.listBox = Gtk.ListBox.new({ hexpand: true,


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