[the-board/sound-thing: 4/4] more



commit 7fe221417b62e51bded88c8ceca09e6b363924a5
Author: Lucas Rocha <lucasr gnome org>
Date:   Wed Jan 5 10:28:50 2011 +0000

    more

 data/things/sound/cassete.png |  Bin 0 -> 7908 bytes
 data/things/sound/style.css   |    2 --
 src/js/ui/things/sound.js     |   19 +++++++++++++++++--
 3 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/data/things/sound/cassete.png b/data/things/sound/cassete.png
new file mode 100644
index 0000000..2eec99d
Binary files /dev/null and b/data/things/sound/cassete.png differ
diff --git a/data/things/sound/style.css b/data/things/sound/style.css
index eef27db..7b98b2b 100644
--- a/data/things/sound/style.css
+++ b/data/things/sound/style.css
@@ -7,7 +7,6 @@ TbBox#sound-thing-sound-box {
 TbBox#sound-thing-content-box {
     spacing: 5px;
     padding: 2px 2px 5px 2px;
-    background-color: black;
 }
 
 TbBox#sound-thing-button-box {
@@ -17,7 +16,6 @@ TbBox#sound-thing-button-box {
 }
 
 TbBox#sound-thing-playback-box {
-    background-color: white;
 }
 
 TbBox#sound-thing-controls-box {
diff --git a/src/js/ui/things/sound.js b/src/js/ui/things/sound.js
index 60412eb..bf9d9fb 100644
--- a/src/js/ui/things/sound.js
+++ b/src/js/ui/things/sound.js
@@ -23,8 +23,10 @@ const Path = imports.util.path;
 const NAME = Gettext.gettext("Sound");
 const STYLE = Path.THINGS_DATA_DIR + "sound/style.css";
 
-const _INITIAL_WIDTH = 200;
-const _INITIAL_HEIGHT = 100;
+const _INITIAL_WIDTH = 233;
+const _INITIAL_HEIGHT = 153;
+
+const _CASSETE_IMAGE = Path.THINGS_DATA_DIR + "sound/cassete.png";
 
 const _SHOW_BUTTON_BOX_TIME = 0.5;
 
@@ -60,9 +62,22 @@ SoundThing.prototype = {
 
         this._soundBox.set_style(this._style);
 
+        this._createCasseteBg();
         this._createContentBox();
     },
 
+    _createCasseteBg : function() {
+        this._casseteBg =
+            new Clutter.Texture({ filename: _CASSETE_IMAGE });
+
+        this._soundBox.append(this._casseteBg,
+                              Tb.BoxPackFlags.FIXED);
+
+        this._soundBox.set_fixed_child_align(this._casseteBg,
+                                             Tb.BoxAlignment.FILL,
+                                             Tb.BoxAlignment.FILL);
+    },
+
     _createContentBox : function() {
         this._contentBox =
             new Tb.Box({ orientation: Tb.BoxOrientation.VERTICAL,



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