gbrainy r323 - trunk/src
- From: jmas svn gnome org
- To: svn-commits-list gnome org
- Subject: gbrainy r323 - trunk/src
- Date: Fri, 9 May 2008 14:36:53 +0100 (BST)
Author: jmas
Date: Fri May 9 13:36:52 2008
New Revision: 323
URL: http://svn.gnome.org/viewvc/gbrainy?rev=323&view=rev
Log:
Enhancements to Player history dialog
Modified:
trunk/src/ChangeLog
trunk/src/PlayerHistoryDialog.cs
trunk/src/gbrainy.glade
Modified: trunk/src/PlayerHistoryDialog.cs
==============================================================================
--- trunk/src/PlayerHistoryDialog.cs (original)
+++ trunk/src/PlayerHistoryDialog.cs Fri May 9 13:36:52 2008
@@ -179,6 +179,23 @@
cr.Stroke ();
}
}
+
+ private void DrawGrid (CairoContextEx cr, double x, double y)
+ {
+ // Draw Axis
+ cr.MoveTo (x, y);
+ cr.LineTo (x, y + area_h);
+ cr.LineTo (x + area_w, y + area_h);
+ cr.Stroke ();
+
+ cr.Color = new Cairo.Color (0.8, 0.8, 0.8);
+ cr.LineWidth = 0.001;
+ for (double line_y = y; line_y < area_h + y; line_y += area_h / 10) {
+ cr.MoveTo (x, line_y);
+ cr.LineTo (x + area_w, line_y);
+ cr.Stroke ();
+ }
+ }
protected override bool OnExposeEvent (Gdk.EventExpose args)
{
@@ -216,14 +233,12 @@
cr.LineWidth = point_size;
cr.Color = axis_color;
+ cr.Rectangle (x, y, area_w, area_h);
+ cr.Clip ();
DrawLines (cr, x, y);
+ cr.ResetClip ();
DrawLegend (cr, x, y + area_h + 0.05);
-
- // Draw Axis
- cr.MoveTo (x, y);
- cr.LineTo (x, y + area_h);
- cr.LineTo (x + area_w, y + area_h);
- cr.Stroke ();
+ DrawGrid (cr, x, y);
((IDisposable)cc).Dispose();
((IDisposable)cr).Dispose();
Modified: trunk/src/gbrainy.glade
==============================================================================
--- trunk/src/gbrainy.glade (original)
+++ trunk/src/gbrainy.glade Fri May 9 13:36:52 2008
@@ -1395,7 +1395,7 @@
<child>
<widget class="GtkLabel" id="label_playerhistory">
<property name="visible">True</property>
- <property name="label" translatable="yes">This graphic represents the player game history.
+ <property name="label" translatable="yes">
</property>
<property name="use_underline">False</property>
@@ -1403,9 +1403,9 @@
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">True</property>
<property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">5</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
@@ -1453,7 +1453,7 @@
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xpad">0</property>
+ <property name="xpad">5</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]