[chronojump] RaceAnalyzer speedometer cares of text height when graphed small
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] RaceAnalyzer speedometer cares of text height when graphed small
- Date: Sat, 21 Aug 2021 10:32:05 +0000 (UTC)
commit 934c9e488f4043c971582102bf4559f124d8a2af
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Aug 21 12:31:33 2021 +0200
RaceAnalyzer speedometer cares of text height when graphed small
src/gui/cairo/radial.cs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/cairo/radial.cs b/src/gui/cairo/radial.cs
index 4125e9632..5b8ae3e1c 100644
--- a/src/gui/cairo/radial.cs
+++ b/src/gui/cairo/radial.cs
@@ -28,8 +28,8 @@ using Mono.Unix;
public class CairoRadial : CairoGeneric
{
private Cairo.Context g;
- private int textHeight = 12;
- private int margin = 1;
+ private int textHeight;
+ private int margin = 4;
private int offsetV = 6; //to move the graph vertically
private Gtk.DrawingArea area;
private string font;
@@ -64,7 +64,10 @@ public class CairoRadial : CairoGeneric
graphWidth = area.Allocation.Width - 2*margin;
graphHeight = area.Allocation.Height - 2*margin;
- if(graphWidth > 1200 || graphHeight > 1000)
+ textHeight = 12;
+ if(graphWidth < 300 || graphHeight < 300)
+ textHeight = 10;
+ else if(graphWidth > 1200 || graphHeight > 1000)
textHeight = 16;
g.SetSourceRGB(0,0,0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]