[longomatch] Format float percent with 2 decimals
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Format float percent with 2 decimals
- Date: Mon, 5 Aug 2013 20:07:42 +0000 (UTC)
commit b62eaf81bd3be83e55f605b33b03e965e7c664b5
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Jul 29 21:34:36 2013 +0200
Format float percent with 2 decimals
LongoMatch.GUI/Gui/Component/Stats/GameViewer.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/Stats/GameViewer.cs
b/LongoMatch.GUI/Gui/Component/Stats/GameViewer.cs
index 0316880..0954626 100644
--- a/LongoMatch.GUI/Gui/Component/Stats/GameViewer.cs
+++ b/LongoMatch.GUI/Gui/Component/Stats/GameViewer.cs
@@ -231,13 +231,13 @@ namespace LongoMatch.Gui.Component
/* Home count */
layout.Width = Pango.Units.FromPixels(COUNT_WIDTH);
layout.Alignment = Pango.Alignment.Right;
- layout.SetMarkup(String.Format(count_tpl, stat.LocalTeamCount, localPercent *
100));
+ layout.SetMarkup(String.Format(count_tpl, stat.LocalTeamCount, (localPercent
* 100).ToString("f2")));
GdkWindow.DrawLayout(Style.TextGC(StateType.Normal), lCenter - (COUNT_WIDTH +
3), 0, layout);
/* Away count */
layout.Width = Pango.Units.FromPixels(COUNT_WIDTH);
layout.Alignment = Pango.Alignment.Left;
- layout.SetMarkup(String.Format(count_tpl, stat.VisitorTeamCount,
visitorPercent * 100));
+ layout.SetMarkup(String.Format(count_tpl, stat.VisitorTeamCount,
(visitorPercent * 100).ToString("f2")));
GdkWindow.DrawLayout(Style.TextGC(StateType.Normal), vCenter + 3, 0, layout);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]