From a9e12f6c508810604c8c91ee15451776b08ce1a1 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 22 Apr 2019 07:41:56 -0400
Subject: [PATCH] Camera capslock fix

---
 timeflow/vis/timeline/AxisRenderer.java |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/timeflow/vis/timeline/AxisRenderer.java b/timeflow/vis/timeline/AxisRenderer.java
index 68bc5fe..7c16246 100755
--- a/timeflow/vis/timeline/AxisRenderer.java
+++ b/timeflow/vis/timeline/AxisRenderer.java
@@ -57,19 +57,23 @@
                         g.setColor(t.unit.isDayOrLess() && (dayOfWeek == 1 || dayOfWeek == 7)
                                 ? new Color(245, 245, 245) : new Color(240, 240, 240));
 
-                        g.fillRect(x0, y, x1 - x0 - 1, h);
+                        g.fillRect(x0, y, x1 - x0, h);
                         g.setColor(Color.white);
-                        g.drawLine(x1 - 1, y, x1 - 1, y + h);
+                        g.drawLine(x1, y, x1, y + h);
                         g.drawLine(x0, y + h, x1, y + h);
-                        objectLocations.add(new Mouseover(new Interval(start, end), x0, y, x1 - x0 - 1, h));
+                        objectLocations.add(new Mouseover(new Interval(start, end), x0, y, x1 - x0, h));
 
                         g.setFont(model.getDisplay().timeLabel());
                         String label = full ? t.unit.formatFull(start) : t.unit.format(new Date(start));
-                        int tx = x0 + 3;
-                        int ty = y + h - 5;
+                        
+                        if (!full)
+                                full = false;
+                        
+                        int tx = x0;
+                        int ty = y + h;
                         g.setColor(full ? Color.darkGray : Color.gray);
                         int sw = model.getDisplay().timeLabelFontMetrics().stringWidth(label);
-                        if (sw < x1 - tx - 3)
+                        if (true) // sw < x1 - tx)
                         {
                                 g.drawString(label, tx, ty);
                         } else
@@ -79,7 +83,7 @@
                                 {
                                         label = label.substring(0, c);
                                         sw = model.getDisplay().timeLabelFontMetrics().stringWidth(label);
-                                        if (sw < x1 - tx - 3)
+                                        //if (sw < x1 - tx)
                                         {
                                                 g.drawString(label, tx, ty);
                                         }

--
Gitblit v1.6.2