[gnome-sound-recorder] window: replace GtkGrid with GtkBox
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] window: replace GtkGrid with GtkBox
- Date: Thu, 28 May 2020 19:01:39 +0000 (UTC)
commit 30270dbd3de026d5911eddb55ad6391a7b30ce10
Author: Kavan Mevada <kavanmevada gmail com>
Date: Thu May 28 23:30:50 2020 +0530
window: replace GtkGrid with GtkBox
data/ui/window.ui | 239 ++++++++++++++++++++++++++----------------------------
src/waveform.js | 2 +-
2 files changed, 114 insertions(+), 127 deletions(-)
---
diff --git a/data/ui/window.ui b/data/ui/window.ui
index e10dafc..f91236a 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -100,78 +100,18 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkGrid">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledWindow">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <child>
- <object class="GtkViewport">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="HdyColumn">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="maximum_width">650</property>
- <property name="linear_growth_width">400</property>
- <child>
- <object class="GtkListBox" id="listBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">6</property>
- <property name="margin_right">6</property>
- <property name="margin_top">18</property>
- <property name="margin_bottom">18</property>
- <property name="selection-mode">none</property>
- <style>
- <class name="preferences"/>
- </style>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="recordGrid">
+ <object class="GtkBox" id="recordGrid">
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="margin_left">18</property>
<property name="margin_right">18</property>
- <property name="margin_start">18</property>
- <property name="margin_end">18</property>
<property name="margin_top">18</property>
<property name="margin_bottom">18</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkButton" id="recordStopButton">
- <property name="label" translatable="yes">Done</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="margin_left">18</property>
- <property name="margin_start">18</property>
- <property name="margin_top">6</property>
- <property name="margin_bottom">4</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
<child>
<object class="GtkBox" id="box-record">
<property name="visible">True</property>
@@ -209,17 +149,75 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="recordStopButton">
+ <property name="label" translatable="yes">Done</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="margin_left">18</property>
+ <property name="margin_start">18</property>
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">4</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledWindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<child>
- <placeholder/>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="HdyColumn">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="maximum_width">650</property>
+ <property name="linear_growth_width">400</property>
+ <child>
+ <object class="GtkListBox" id="listBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">18</property>
+ <property name="margin_bottom">18</property>
+ <property name="selection_mode">none</property>
+ <style>
+ <class name="preferences"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -228,73 +226,62 @@
</packing>
</child>
<child>
- <object class="GtkGrid">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkGrid">
+ <object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="icon_name">audio-input-microphone-symbolic</property>
- <property name="icon_size">6</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Use the <b>Record</b> button
to make sound recordings</property>
- <property name="use_markup">True</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">50</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Add Recordings</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
+ <property name="icon_name">audio-input-microphone-symbolic</property>
+ <property name="icon_size">6</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Add Recordings</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Use the <b>Record</b> button to
make sound recordings</property>
+ <property name="use_markup">True</property>
+ <property name="justify">center</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">50</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
diff --git a/src/waveform.js b/src/waveform.js
index d88c954..208454a 100644
--- a/src/waveform.js
+++ b/src/waveform.js
@@ -57,7 +57,7 @@ var WaveForm = class WaveForm {
this.drawing = Gtk.DrawingArea.new();
if (this.waveType === WaveType.RECORD) {
this.drawing.set_property('hexpand', true);
- this._grid.attach(this.drawing, 1, 0, 1, 1);
+ this._grid.add(this.drawing);
} else {
this.drawing.set_property('valign', Gtk.Align.FILL);
this.drawing.set_property('hexpand', true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]