[gnome-usage] Drop BetterBox in favor of standard Gtk.Box
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-usage] Drop BetterBox in favor of standard Gtk.Box
- Date: Tue, 21 Nov 2017 13:11:40 +0000 (UTC)
commit f88c51e17c257f9f3a492f045e59dbf24afc2a78
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Nov 21 14:03:15 2017 +0100
Drop BetterBox in favor of standard Gtk.Box
There's no need to specialize this one, it is just adding extra
complexity to the codebase.
src/better-box.vala | 43 -------------------------------------------
src/cpu-sub-view.vala | 9 ++-------
src/memory-sub-view.vala | 9 ++-------
src/meson.build | 1 -
4 files changed, 4 insertions(+), 58 deletions(-)
---
diff --git a/src/cpu-sub-view.vala b/src/cpu-sub-view.vala
index d425489..bcd4c1b 100644
--- a/src/cpu-sub-view.vala
+++ b/src/cpu-sub-view.vala
@@ -53,6 +53,7 @@ namespace Usage
no_process_view = new NoResultsFoundView();
var cpu_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
+ cpu_box.halign = Gtk.Align.CENTER;
cpu_box.pack_start(label, false, false, 0);
cpu_box.pack_start(cpu_graph_box, false, false, 0);
cpu_box.pack_start(spinner, true, true, 0);
@@ -67,14 +68,8 @@ namespace Usage
process_list_box.bind_property ("empty", no_process_view, "visible", BindingFlags.BIDIRECTIONAL);
- var better_box = new BetterBox();
- better_box.max_width_request = 600;
- better_box.halign = Gtk.Align.CENTER;
- better_box.orientation = Gtk.Orientation.HORIZONTAL;
- better_box.add(cpu_box);
-
var scrolled_window = new Gtk.ScrolledWindow(null, null);
- scrolled_window.add(better_box);
+ scrolled_window.add(cpu_box);
scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
add(scrolled_window);
diff --git a/src/memory-sub-view.vala b/src/memory-sub-view.vala
index c1f7a42..eaa836d 100644
--- a/src/memory-sub-view.vala
+++ b/src/memory-sub-view.vala
@@ -50,6 +50,7 @@ namespace Usage
speedometers.margin_top = 30;
var memory_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
+ memory_box.halign = Gtk.Align.CENTER;
memory_box.pack_start(speedometers, false, false, 0);
memory_box.pack_start(spinner, true, true, 0);
memory_box.add(no_process_view);
@@ -63,14 +64,8 @@ namespace Usage
process_list_box.bind_property ("empty", no_process_view, "visible", BindingFlags.BIDIRECTIONAL);
- var better_box = new BetterBox();
- better_box.max_width_request = 600;
- better_box.halign = Gtk.Align.CENTER;
- better_box.orientation = Gtk.Orientation.HORIZONTAL;
- better_box.add(memory_box);
-
var scrolled_window = new Gtk.ScrolledWindow(null, null);
- scrolled_window.add(better_box);
+ scrolled_window.add(memory_box);
scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
add(scrolled_window);
diff --git a/src/meson.build b/src/meson.build
index a968909..9a779e6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,6 +1,5 @@
vala_sources = [
'application.vala',
- 'better-box.vala',
'color-rectangle.vala',
'cpu-graph-table.vala',
'cpu-graph.vala',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]