[chronojump] DoubleContacts cairo graph uses colorBackground for chunks
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DoubleContacts cairo graph uses colorBackground for chunks
- Date: Wed, 3 Nov 2021 18:57:34 +0000 (UTC)
commit 29320afd914ca50d4fbcdf09fcf6d8493917ae75
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Nov 3 15:57:12 2021 -0300
DoubleContacts cairo graph uses colorBackground for chunks
src/gui/cairo/runDoubleContacts.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/cairo/runDoubleContacts.cs b/src/gui/cairo/runDoubleContacts.cs
index 3d06e9a37..a11a8795f 100644
--- a/src/gui/cairo/runDoubleContacts.cs
+++ b/src/gui/cairo/runDoubleContacts.cs
@@ -29,6 +29,7 @@ public class CairoRunDoubleContacts : CairoGeneric
private DrawingArea area;
private Cairo.Context g;
private Cairo.Color black;
+ private Cairo.Color colorBackground;
private int rightMargin = 35; //TODO: on windows should be 55
private int bottomMargin = 0;
@@ -69,6 +70,8 @@ public class CairoRunDoubleContacts : CairoGeneric
g.SelectFontFace(font, Cairo.FontSlant.Normal, Cairo.FontWeight.Normal);
g.SetFontSize(textHeight);
+ colorBackground = colorFromGdk(Config.ColorBackground);
+
black = colorFromRGB(0,0,0);
//gray = colorFromRGB(99,99,99); //gray99
g.Color = black;
@@ -79,7 +82,6 @@ public class CairoRunDoubleContacts : CairoGeneric
bool drawStart, bool drawEnd)
{
LogB.Information("CONTACT CHUNKS at Cairo");
- g.Color = black;
double lastChunkStart = 0;
int chunkMargins = 4;
@@ -96,12 +98,14 @@ public class CairoRunDoubleContacts : CairoGeneric
LogB.Information(string.Format("xEnd parts: {0}, {1}, {2}",
inPTL.tcEnd, negativePTLTime, timeTotalWithExtraPTL));
+ g.Color = colorBackground;
g.Rectangle(xStart, graphHeight-bottomMargin-4, xEnd-xStart, 4);
g.Fill();
LogB.Information(string.Format("xStart: {0}, yTop: {1}, width: {2}, height: {3}",
xStart, graphHeight-bottomMargin-4, xEnd-xStart, 4));
+ g.Color = black;
//manage chunks indications
if(inPTL.phase == RunPhaseTimeListObject.Phases.START)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]