[gbrainy] A bit more space between the figure and the text
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gbrainy] A bit more space between the figure and the text
- Date: Thu, 1 Apr 2010 18:31:56 +0000 (UTC)
commit b953ab638b0e2e117fb0662aebc5c2b78d9d8f87
Author: Jordi Mas <jmas softcatala org>
Date: Thu Apr 1 20:32:37 2010 +0200
A bit more space between the figure and the text
src/Games/Logic/PuzzlePencil.cs | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/Games/Logic/PuzzlePencil.cs b/src/Games/Logic/PuzzlePencil.cs
index 8ee2bc2..a939cc1 100644
--- a/src/Games/Logic/PuzzlePencil.cs
+++ b/src/Games/Logic/PuzzlePencil.cs
@@ -59,6 +59,7 @@ namespace gbrainy.Games.Logic
break;
}
+ const double text_offset = 0.04;
double x = DrawAreaX, y = DrawAreaY + 0.1, box_size = (1 - (DrawAreaX * 2)) / 3;
HorizontalContainer container1, container2, container = null;
DrawableArea drawable_area;
@@ -93,7 +94,7 @@ namespace gbrainy.Games.Logic
drawable_area.DrawEventHandler += delegate (object sender, DrawEventArgs e)
{
DrawTriangle (e.Context, (e.Width - figure_size) / 2, 0);
- e.Context.DrawTextCentered (e.Width / 2, figure_size + 0.02,
+ e.Context.DrawTextCentered (e.Width / 2, figure_size + text_offset,
GetPossibleFigureAnswer ((int) e.Data));
};
break;
@@ -101,7 +102,7 @@ namespace gbrainy.Games.Logic
drawable_area.DrawEventHandler += delegate (object sender, DrawEventArgs e)
{
DrawDiamon (e.Context, (e.Width - figure_size) / 2, 0);
- e.Context.DrawTextCentered (e.Width / 2, figure_size + 0.02,
+ e.Context.DrawTextCentered (e.Width / 2, figure_size + text_offset,
GetPossibleFigureAnswer ((int) e.Data));
};
break;
@@ -109,7 +110,7 @@ namespace gbrainy.Games.Logic
drawable_area.DrawEventHandler += delegate (object sender, DrawEventArgs e)
{
DrawRectangleWithTriangles (e.Context, (e.Width - figure_size) / 2, 0);
- e.Context.DrawTextCentered (e.Width / 2, figure_size + + 0.02,
+ e.Context.DrawTextCentered (e.Width / 2, figure_size + text_offset,
GetPossibleFigureAnswer ((int) e.Data));
};
break;
@@ -117,7 +118,7 @@ namespace gbrainy.Games.Logic
drawable_area.DrawEventHandler += delegate (object sender, DrawEventArgs e)
{
DrawThreeTriangles (e.Context, (e.Width - figure_size) / 2, 0);
- e.Context.DrawTextCentered (e.Width / 2, figure_size + + 0.02,
+ e.Context.DrawTextCentered (e.Width / 2, figure_size + text_offset,
GetPossibleFigureAnswer ((int) e.Data));
};
break;
@@ -125,7 +126,7 @@ namespace gbrainy.Games.Logic
drawable_area.DrawEventHandler += delegate (object sender, DrawEventArgs e)
{
DrawRectangleWithCross (e.Context, (e.Width - figure_size) / 2, 0);
- e.Context.DrawTextCentered (e.Width / 2, figure_size + 0.02,
+ e.Context.DrawTextCentered (e.Width / 2, figure_size + text_offset,
GetPossibleFigureAnswer ((int) e.Data));
};
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]