[libgames-support] Center the "no scores yet" box
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgames-support] Center the "no scores yet" box
- Date: Fri, 24 Jul 2015 18:27:31 +0000 (UTC)
commit ac99491a0f39ceb1327725cd35e891b9cef6840f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Jul 24 13:26:35 2015 -0500
Center the "no scores yet" box
Set the height request for the dialog rather than the box, so that the
box can be centered within the dialog.
games/scores/dialog.vala | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/games/scores/dialog.vala b/games/scores/dialog.vala
index d20ead7..2d1319f 100644
--- a/games/scores/dialog.vala
+++ b/games/scores/dialog.vala
@@ -64,30 +64,29 @@ private class Dialog : Gtk.Dialog
if (!context.has_scores () && new_high_score == null)
{
var vbox = this.get_content_area ();
- vbox.spacing = 12;
+ vbox.spacing = 4;
vbox.border_width = 10;
- vbox.width_request = 450;
- vbox.height_request = 500;
+ vbox.valign = Gtk.Align.CENTER;
vbox.get_style_context ().add_class ("dim-label");
var image = new Gtk.Image ();
image.icon_name = app_name + "-symbolic";
image.pixel_size = 64;
image.opacity = 0.2;
- image.valign = Gtk.Align.CENTER;
- vbox.add (image);
+ vbox.pack_start (image, false, false);
var title_label = new Gtk.Label ("<b><span size=\"large\">" + _("No scores yet") +
"</span></b>");
title_label.use_markup = true;
- title_label.valign = Gtk.Align.CENTER;
- vbox.add (title_label);
+ vbox.pack_start (title_label, false, false);
var description_label = new Gtk.Label (_("Play some games and your scores will show up here."));
- description_label.valign = Gtk.Align.CENTER;
- vbox.add (description_label);
+ vbox.pack_start (description_label, false, false);
vbox.show_all ();
+ width_request = 450;
+ height_request = 500;
+
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]