[gnome-boxes] wizard: Same size for all toolbar buttons
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] wizard: Same size for all toolbar buttons
- Date: Tue, 9 Oct 2012 19:20:38 +0000 (UTC)
commit 4ce9e3e0469b683880445f569c11c758dbc5e70f
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Oct 9 03:31:34 2012 +0300
wizard: Same size for all toolbar buttons
Put toolbar buttons in a sizegroup so they are equally sized.
https://bugzilla.gnome.org/show_bug.cgi?id=685779
src/wizard.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index eb1090f..17d2d1c 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -19,6 +19,7 @@ private class Boxes.Wizard: Boxes.UI {
private Gtk.Button cancel_button;
private Gtk.Button back_button;
private Gtk.Button next_button;
+ private Gtk.SizeGroup toolbar_sizegroup;
private Boxes.WizardSource wizard_source;
private WizardSummary summary;
private CollectionSource? source;
@@ -601,6 +602,7 @@ private class Boxes.Wizard: Boxes.UI {
toolbar.toolbar_style = Gtk.ToolbarStyle.TEXT;
hbox.pack_start (toolbar, true, true, 0);
+ toolbar_sizegroup = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
cancel_button = toolbar.add_button (null, _("_Cancel"), false) as Gtk.Button;
cancel_button.use_underline = true;
cancel_button.clicked.connect (() => {
@@ -608,12 +610,14 @@ private class Boxes.Wizard: Boxes.UI {
wizard_source.page = SourcePage.MAIN;
App.app.ui_state = UIState.COLLECTION;
});
+ toolbar_sizegroup.add_widget (cancel_button);
back_button = toolbar.add_button (null, _("_Back"), false) as Gtk.Button;
back_button.use_underline = true;
back_button.clicked.connect (() => {
page = page - 1;
});
+ toolbar_sizegroup.add_widget (back_button);
next_button = toolbar.add_button (null, _("C_ontinue"), false) as Gtk.Button;
next_button.use_underline = true;
@@ -621,6 +625,7 @@ private class Boxes.Wizard: Boxes.UI {
next_button.clicked.connect (() => {
page = page + 1;
});
+ toolbar_sizegroup.add_widget (next_button);
hbox.show_all ();
notebook.show_all ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]