[chronojump] CairoBarsEncoder title in bold and really at top
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] CairoBarsEncoder title in bold and really at top
- Date: Tue, 29 Mar 2022 10:53:46 +0000 (UTC)
commit 650cf63f385d0b914313a91e1cc751224b03dee3
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Mar 29 12:53:24 2022 +0200
CairoBarsEncoder title in bold and really at top
src/gui/cairo/bars.cs | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/cairo/bars.cs b/src/gui/cairo/bars.cs
index fdd38f752..e1a19d6b1 100644
--- a/src/gui/cairo/bars.cs
+++ b/src/gui/cairo/bars.cs
@@ -775,6 +775,7 @@ public abstract class CairoBars : CairoGeneric
// 1) get the titleTextHeight for titleFull
int titleTextHeight = textHeight +2;
g.SetFontSize(titleTextHeight);
+ g.SelectFontFace(font, Cairo.FontSlant.Normal, Cairo.FontWeight.Bold);
Cairo.TextExtents te = g.TextExtents(titleFull);
if (te.Width > graphWidth) //margins?
@@ -804,21 +805,21 @@ public abstract class CairoBars : CairoGeneric
// 3) paint title, loss, work, impulse
g.SetSourceColor(black);
- printText(graphWidth/2 -titleFullWidth/2, textHeight/2, 0, titleTextHeight,
+ printText(graphWidth/2 -titleFullWidth/2, textHeight/3, 0, titleTextHeight,
titleStr, g, alignTypes.LEFT);
if(lossStr != "")
{
g.SetSourceColor(gray99); //darker than the arrow line
- printText(graphWidth/2 -titleFullWidth/2 + titleWidth, textHeight/2, 0,
titleTextHeight,
+ printText(graphWidth/2 -titleFullWidth/2 + titleWidth, textHeight/3, 0,
titleTextHeight,
lossStr, g, alignTypes.LEFT);
g.SetSourceColor(black);
}
- printText(graphWidth/2 -titleFullWidth/2 + titleWidth +lossWidth, textHeight/2, 0,
titleTextHeight,
+ printText(graphWidth/2 -titleFullWidth/2 + titleWidth +lossWidth, textHeight/3, 0,
titleTextHeight,
workStr, g, alignTypes.LEFT);
- printText(graphWidth/2 -titleFullWidth/2 + titleWidth +lossWidth +workWidth, textHeight/2, 0,
titleTextHeight,
+ printText(graphWidth/2 -titleFullWidth/2 + titleWidth +lossWidth +workWidth, textHeight/3, 0,
titleTextHeight,
impulseStr, g, alignTypes.LEFT);
g.Restore();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]