[longomatch] Use the config font instead of hardcoding Ubuntu
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Use the config font instead of hardcoding Ubuntu
- Date: Sat, 7 Feb 2015 10:12:39 +0000 (UTC)
commit de116b85e8e7e55a8747bd5ee7123a7009454bdf
Author: Julien Moutte <julien fluendo com>
Date: Fri Feb 6 15:44:33 2015 +0100
Use the config font instead of hardcoding Ubuntu
LongoMatch.Core/StyleConf.cs | 2 +-
LongoMatch.Drawing.Cairo/CairoBackend.cs | 2 +-
LongoMatch.Drawing/CanvasObjects/LabelObject.cs | 2 +-
LongoMatch.Drawing/Widgets/Blackboard.cs | 2 +-
LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs | 2 +-
.../Gui/Component/GameDescriptionHeader.cs | 4 ++--
LongoMatch.GUI/Gui/Component/TeamsComboBox.cs | 2 +-
LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/LongoMatch.Core/StyleConf.cs b/LongoMatch.Core/StyleConf.cs
index 6a39b4d..40a94a3 100644
--- a/LongoMatch.Core/StyleConf.cs
+++ b/LongoMatch.Core/StyleConf.cs
@@ -47,7 +47,7 @@ namespace LongoMatch.Core.Common
public const int NewTeamsComboWidth = 245;
public const int NewTeamsComboHeight = 60;
public const int NewTeamsIconSize = 55;
- public const string NewTeamsFont = "Ubuntu 16";
+ public const int NewTeamsFontSize = 16;
public static Color NewTeamsFontColor = Color.White;
public const int NewTeamsSpacing = 60;
public const int NewTaggerSpacing = 35;
diff --git a/LongoMatch.Drawing.Cairo/CairoBackend.cs b/LongoMatch.Drawing.Cairo/CairoBackend.cs
index 5c6921c..83b7e49 100644
--- a/LongoMatch.Drawing.Cairo/CairoBackend.cs
+++ b/LongoMatch.Drawing.Cairo/CairoBackend.cs
@@ -51,7 +51,7 @@ namespace LongoMatch.Drawing.Cairo
FillColor = Color.Black;
LineWidth = 2;
FontSize = 12;
- FontFamily = "Ubuntu";
+ FontFamily = Config.Style.Font;
FontWeight = FontWeight.Normal;
FontSlant = FontSlant.Normal;
LineStyle = LineStyle.Normal;
diff --git a/LongoMatch.Drawing/CanvasObjects/LabelObject.cs b/LongoMatch.Drawing/CanvasObjects/LabelObject.cs
index 2589181..3929298 100644
--- a/LongoMatch.Drawing/CanvasObjects/LabelObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/LabelObject.cs
@@ -58,7 +58,7 @@ namespace LongoMatch.Drawing.CanvasObjects
get {
int width, height;
Config.DrawingToolkit.MeasureText (
- Name, out width, out height, "Ubuntu",
+ Name, out width, out height, Config.Style.Font ,
DEFAULT_FONT_SIZE, FontWeight.Normal);
return TextOffset + width;
}
diff --git a/LongoMatch.Drawing/Widgets/Blackboard.cs b/LongoMatch.Drawing/Widgets/Blackboard.cs
index 2b73ef6..9360b6f 100644
--- a/LongoMatch.Drawing/Widgets/Blackboard.cs
+++ b/LongoMatch.Drawing/Widgets/Blackboard.cs
@@ -231,7 +231,7 @@ namespace LongoMatch.Drawing.Widgets
return;
}
Config.DrawingToolkit.MeasureText (text.Value, out width, out heigth,
- "Ubuntu", FontSize, FontWeight.Normal);
+ Config.Style.Font, FontSize, FontWeight.Normal);
text.Update (new Point (start.X - width / 2, start.Y - heigth / 2),
width, heigth);
text.TextColor = TextColor.Copy ();
diff --git a/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs b/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
index b8d0e9d..e205273 100644
--- a/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
@@ -259,7 +259,7 @@ namespace LongoMatch.Gui
void SetStyle (int height, int fontSize, int timeWidth)
{
- string font = String.Format ("Ubuntu {0}px", fontSize);
+ string font = String.Format ("{0} {1}px", Config.Style.Font, fontSize);
Pango.FontDescription desc = Pango.FontDescription.FromString (font);
controllerbox.HeightRequest = height;
diff --git a/LongoMatch.GUI/Gui/Component/GameDescriptionHeader.cs
b/LongoMatch.GUI/Gui/Component/GameDescriptionHeader.cs
index cdfc639..5aa1e2f 100644
--- a/LongoMatch.GUI/Gui/Component/GameDescriptionHeader.cs
+++ b/LongoMatch.GUI/Gui/Component/GameDescriptionHeader.cs
@@ -61,8 +61,8 @@ namespace LongoMatch.Gui.Component
}
void SetStyle () {
- Pango.FontDescription numDesc = Pango.FontDescription.FromString ("Ubuntu 48px");
- Pango.FontDescription nameDesc = Pango.FontDescription.FromString ("Ubuntu 30px");
+ Pango.FontDescription numDesc = Pango.FontDescription.FromString (Config.Style.Font +
" 48px");
+ Pango.FontDescription nameDesc = Pango.FontDescription.FromString (Config.Style.Font
+ " 30px");
homescoreeventbox.ModifyBg (StateType.Normal, Misc.ToGdkColor
(Config.Style.PaletteBackgroundDark));
homescorelabel.ModifyFg (StateType.Normal, Misc.ToGdkColor
(Config.Style.PaletteText));
diff --git a/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs b/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
index d22f60a..8a0b617 100644
--- a/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
@@ -41,7 +41,7 @@ namespace LongoMatch.Gui.Component
Clear ();
pixrender = new CellRendererPixbuf ();
texrender = new CellRendererText ();
- texrender.Font = StyleConf.NewTeamsFont;
+ texrender.Font = Config.Style.Font + " " + StyleConf.NewTeamsFontSize;
texrender.Alignment = Pango.Alignment.Center;
if (Direction == TextDirection.Ltr) {
diff --git a/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
b/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
index 4302824..a6c9700 100644
--- a/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
@@ -80,7 +80,7 @@ namespace LongoMatch.Gui.Panel
void SetStyle ()
{
- FontDescription desc = FontDescription.FromString ("Ubuntu 18");
+ FontDescription desc = FontDescription.FromString (Config.Style.Font + " 18");
infoeventbox.ModifyBg (StateType.Normal, Misc.ToGdkColor
(Config.Style.PaletteBackgroundDark));
infolabel.ModifyFg (StateType.Normal, Misc.ToGdkColor (Config.Style.PaletteText));
infolabel.ModifyFont (desc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]