[gnome-sound-recorder] waveform.js: Reset the wavform size each time it's generated



commit ededc1a8d71064f446ff897a8b1373eb33f3af0a
Author: Meg Ford <megford gnome org>
Date:   Fri May 16 20:44:08 2014 -0500

    waveform.js: Reset the wavform size each time it's generated

 src/waveform.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/waveform.js b/src/waveform.js
index ffdf990..c58f74b 100644
--- a/src/waveform.js
+++ b/src/waveform.js
@@ -66,7 +66,7 @@ const WaveForm = new Lang.Class({
         let drawingWidth = 0;
         let drawingHeight = 0;
         this.drawing = Gtk.DrawingArea.new({ height_request: 45,
-                                             width_request: 350,
+                                             width_request: 300,
                                              valign: Gtk.Align.FILL });
         if (this.waveType == WaveType.RECORD) {
             gridWidth = MainWindow.groupGrid.get_allocated_width();
@@ -75,7 +75,9 @@ const WaveForm = new Lang.Class({
             this.drawing.set_property("hexpand",true);
             this._grid.attach(this.drawing, 2, 0, 3, 2);
         } else {
-            this.drawing.set_size_request(350, 45);
+            gridWidth = this._grid.get_allocated_width();
+            gridWidth = gridWidth * 0.70;
+            this.drawing.set_size_request(gridWidth, 45);
             this.drawing.set_property("hexpand",true);
             this._grid.add(this.drawing);
         }


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