Merge lp:~elementary-apps/appcenter/cancel-label into lp:~elementary-apps/appcenter/appcenter

Proposed by Danielle Foré
Status: Merged
Approved by: Cody Garver
Approved revision: 154
Merged at revision: 155
Proposed branch: lp:~elementary-apps/appcenter/cancel-label
Merge into: lp:~elementary-apps/appcenter/appcenter
Diff against target: 42 lines (+6/-3)
2 files modified
src/Views/AppListView.vala (+1/-0)
src/Widgets/PackageRow.vala (+5/-3)
To merge this branch: bzr merge lp:~elementary-apps/appcenter/cancel-label
Reviewer Review Type Date Requested Status
kay van der Zander (community) Approve
Review via email: mp+289575@code.launchpad.net

Commit message

Use label for cancel button and add it to the size group

To post a comment you must log in.
Revision history for this message
kay van der Zander (kay20) wrote :

Looks great

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Views/AppListView.vala'
2--- src/Views/AppListView.vala 2016-03-16 20:05:03 +0000
3+++ src/Views/AppListView.vala 2016-03-20 00:35:13 +0000
4@@ -72,6 +72,7 @@
5 public void add_package (AppCenterCore.Package package) {
6 var row = new Widgets.PackageRow (package);
7 update_button_group.add_widget (row.update_button);
8+ update_button_group.add_widget (row.cancel_button);
9 row.show_all ();
10 list_box.add (row);
11 }
12
13=== modified file 'src/Widgets/PackageRow.vala'
14--- src/Widgets/PackageRow.vala 2016-03-16 20:05:03 +0000
15+++ src/Widgets/PackageRow.vala 2016-03-20 00:35:13 +0000
16@@ -28,11 +28,11 @@
17 Gtk.Label package_summary;
18
19 public Gtk.Button update_button;
20+ public Gtk.Button cancel_button;
21 Gtk.Stack action_stack;
22 Gtk.Grid update_grid;
23 Gtk.ProgressBar update_progressbar;
24 Gtk.Label update_label;
25- Gtk.Button cancel_button;
26
27 public PackageRow (Package package) {
28 this.package = package;
29@@ -113,9 +113,11 @@
30
31 update_label = new Gtk.Label (null);
32 update_progressbar = new Gtk.ProgressBar ();
33- cancel_button = new Gtk.Button.from_icon_name ("process-stop-symbolic", Gtk.IconSize.MENU);
34- cancel_button.get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
35+ update_progressbar.margin_end = 12;
36+
37+ cancel_button = new Gtk.Button.with_label (_("Cancel"));
38 cancel_button.valign = Gtk.Align.CENTER;
39+ cancel_button.margin_end = 6;
40
41 update_grid = new Gtk.Grid ();
42 update_grid.attach (update_label, 0, 0, 1, 1);

Subscribers

People subscribed via source and target branches

to all changes: