[gnome-sound-recorder] Fix Bug 724455



commit 074d5cb6665a93026f1a0a774ce01d53ba6c0682
Author: Meg Ford <megford gnome org>
Date:   Sun Dec 28 13:32:43 2014 -0600

    Fix Bug 724455
    
    Remove manual sizing of widgets from Waveform.js

 src/waveform.js |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/src/waveform.js b/src/waveform.js
index d340e3e..d1c923c 100644
--- a/src/waveform.js
+++ b/src/waveform.js
@@ -61,34 +61,29 @@ const WaveForm = new Lang.Class({
             this._uri = this.file.uri;
         } else {
           this.waveType = WaveType.RECORD;
-        }  
-        
+        }
+
         let gridWidth = 0;
         let drawingWidth = 0;
         let drawingHeight = 0;
-        this.drawing = Gtk.DrawingArea.new({ height_request: 45,
-                                             width_request: 300,
-                                             valign: Gtk.Align.FILL });
+        this.drawing = Gtk.DrawingArea.new();
         if (this.waveType == WaveType.RECORD) {
-            gridWidth = MainWindow.groupGrid.get_allocated_width();
-            drawingWidth = gridWidth * 0.75;
-            this.drawing.set_size_request(drawingWidth, 36);
+            this.drawing.set_property("valign", Gtk.Align.FILL);
             this.drawing.set_property("hexpand",true);
             this._grid.attach(this.drawing, 2, 0, 3, 2);
         } else {
-            gridWidth = this._grid.get_allocated_width();
-            gridWidth = gridWidth * 0.70;
-            this.drawing.set_size_request(gridWidth, 45);
+            this.drawing.set_property("valign", Gtk.Align.FILL);
             this.drawing.set_property("hexpand",true);
+            this.drawing.set_property("vexpand",true);
             this._grid.add(this.drawing);
         }
 
         this.drawing.connect("draw", Lang.bind(this, this.fillSurface));
         this.drawing.show_all();
         this._grid.show_all();
-        
-        if (this.waveType == WaveType.PLAY) { 
-            this._launchPipeline();            
+
+        if (this.waveType == WaveType.PLAY) {
+            this._launchPipeline();
             this.startGeneration();
         }
     },


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