Merge lp:~niclasl/scratch/fix-padding into lp:scratch/2.x

Proposed by Niclas Lockner
Status: Merged
Approved by: Mario Guerriero
Approved revision: 1229
Merged at revision: 1229
Proposed branch: lp:~niclasl/scratch/fix-padding
Merge into: lp:scratch/2.x
Diff against target: 30 lines (+5/-3)
1 file modified
src/Widgets/DynamicNotebook.vala (+5/-3)
To merge this branch: bzr merge lp:~niclasl/scratch/fix-padding
Reviewer Review Type Date Requested Status
Mario Guerriero (community) Approve
Review via email: mp+198624@code.launchpad.net

Commit message

Add padding around the new tab button

Description of the change

Add padding around the new tab button

To post a comment you must log in.
lp:~niclasl/scratch/fix-padding updated
1229. By Niclas Lockner

Add padding around the new tab button

Revision history for this message
Niclas Lockner (niclasl) wrote :

Now it's ready for review.

Revision history for this message
Mario Guerriero (mefrio-g) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Widgets/DynamicNotebook.vala'
--- src/Widgets/DynamicNotebook.vala 2013-10-30 19:44:28 +0000
+++ src/Widgets/DynamicNotebook.vala 2013-12-11 19:08:51 +0000
@@ -435,6 +435,7 @@
435 private Gtk.Button add_button;435 private Gtk.Button add_button;
436 private Gtk.Button restore_button; // should be a Gtk.MenuButton when we have Gtk+ 3.6436 private Gtk.Button restore_button; // should be a Gtk.MenuButton when we have Gtk+ 3.6
437437
438 private static const int ADD_BUTTON_PADDING = 5; // Padding around the new tab button
438 private static const string CLOSE_BUTTON_STYLE = """439 private static const string CLOSE_BUTTON_STYLE = """
439 * {440 * {
440 -GtkButton-default-border : 0;441 -GtkButton-default-border : 0;
@@ -494,14 +495,15 @@
494 this.tab_restored (tab);495 this.tab_restored (tab);
495 });496 });
496497
498 Gtk.Box add_button_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
497 add_button = new Gtk.Button ();499 add_button = new Gtk.Button ();
498 add_button.add (new Gtk.Image.from_icon_name ("list-add-symbolic", Gtk.IconSize.MENU));500 add_button.add (new Gtk.Image.from_icon_name ("list-add-symbolic", Gtk.IconSize.MENU));
499 add_button.margin_left = 6;
500 add_button.relief = Gtk.ReliefStyle.NONE;501 add_button.relief = Gtk.ReliefStyle.NONE;
501 add_button.tooltip_text = _("New Tab");502 add_button.tooltip_text = _("New Tab");
502 this.notebook.set_action_widget (add_button, Gtk.PackType.START);
503 add_button.show_all ();
504 add_button.get_style_context ().add_provider (button_fix, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);503 add_button.get_style_context ().add_provider (button_fix, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
504 add_button_box.pack_start (add_button, false, false, ADD_BUTTON_PADDING);
505 add_button_box.show_all ();
506 this.notebook.set_action_widget (add_button_box, Gtk.PackType.START);
505507
506 restore_button = new Gtk.Button ();508 restore_button = new Gtk.Button ();
507 restore_button.add (new Gtk.Image.from_icon_name ("user-trash-symbolic", Gtk.IconSize.MENU));509 restore_button.add (new Gtk.Image.from_icon_name ("user-trash-symbolic", Gtk.IconSize.MENU));

Subscribers

People subscribed via source and target branches