[gbrainy] Custom Game Dialog fixes.1) Use SimpleLable & 2) make box a bit bigger
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gbrainy] Custom Game Dialog fixes.1) Use SimpleLable & 2) make box a bit bigger
- Date: Wed, 10 Mar 2010 10:15:52 +0000 (UTC)
commit b83dc088a319c2440f66dca0e303180e9088f2a2
Author: Jordi Mas <jmas softcatala org>
Date: Wed Mar 10 11:16:43 2010 +0100
Custom Game Dialog fixes.1) Use SimpleLable & 2) make box a bit bigger
src/Clients/Classical/Dialogs/CustomGameDialog.cs | 12 ++++++++--
.../Classical/Dialogs/ui/CustomGameDialog.ui | 22 ++++++++++----------
2 files changed, 20 insertions(+), 14 deletions(-)
---
diff --git a/src/Clients/Classical/Dialogs/CustomGameDialog.cs b/src/Clients/Classical/Dialogs/CustomGameDialog.cs
index a9491f5..fa52416 100644
--- a/src/Clients/Classical/Dialogs/CustomGameDialog.cs
+++ b/src/Clients/Classical/Dialogs/CustomGameDialog.cs
@@ -32,8 +32,9 @@ namespace gbrainy.Clients.Classical
static ListStore games_store;
[GtkBeans.Builder.Object] Gtk.TreeView treeview;
[GtkBeans.Builder.Object] Box preview_vbox;
- [GtkBeans.Builder.Object] Label preview_question;
+ [GtkBeans.Builder.Object] Gtk.Box question_vbox;
CairoPreview drawing_area;
+ SimpleLabel question_label;
GameManager manager;
int ngames, npos;
Type [] custom_games;
@@ -56,6 +57,11 @@ namespace gbrainy.Clients.Classical
preview_vbox.Add (drawing_area);
drawing_area.Visible = true;
+ question_label = new SimpleLabel ();
+ question_label.HeightMargin = 2;
+ question_label.Visible = true;
+ question_vbox.Add (question_label);
+
// Define columns
TreeViewColumn name_column = new TreeViewColumn (Catalog.GetString("Game Name"),
new CellRendererText(), "text", 0);
@@ -95,7 +101,7 @@ namespace gbrainy.Clients.Classical
game = (Game) Activator.CreateInstance (games [0], true);
game.Initialize ();
drawing_area.puzzle = game;
- preview_question.Markup = game.Question;
+ question_label.Text = game.Question;
treeview.ColumnsAutosize ();
}
@@ -114,7 +120,7 @@ namespace gbrainy.Clients.Classical
Game game = games_store.GetValue (iter, COL_OBJECT) as Game;
game.IsPreviewMode = true;
game.Initialize ();
- preview_question.Markup = game.Question;
+ question_label.Text = game.Question;
drawing_area.puzzle = game;
drawing_area.QueueDraw ();
}
diff --git a/src/Clients/Classical/Dialogs/ui/CustomGameDialog.ui b/src/Clients/Classical/Dialogs/ui/CustomGameDialog.ui
index c6503a6..05b2fbf 100644
--- a/src/Clients/Classical/Dialogs/ui/CustomGameDialog.ui
+++ b/src/Clients/Classical/Dialogs/ui/CustomGameDialog.ui
@@ -3,12 +3,12 @@
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="customgame">
- <property name="width_request">700</property>
- <property name="height_request">400</property>
+ <property name="width_request">750</property>
+ <property name="height_request">480</property>
<property name="visible">True</property>
<property name="border_width">7</property>
<property name="title" translatable="yes">Custom Game</property>
- <property name="default_width">490</property>
+ <property name="default_width">470</property>
<property name="default_height">280</property>
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
@@ -93,20 +93,20 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox7">
+ <object class="GtkVBox" id="puzzle_vbox">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="preview_question">
- <property name="height_request">50</property>
+ <object class="GtkVBox" id="question_vbox">
+ <property name="height_request">60</property>
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">1</property>
- <property name="wrap">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]