Fossil

Check-in [7ac88481]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Disable the feature that changes the foreground color of the graph based on the background color of the item, as the item background color no longer extends under the graph.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7ac88481a69ddb5fd5ac21a3a482741719218031c4e4c34bcfaa8875855876b8
User & Date: drh 2018-06-07 00:45:54.145
References
2018-06-14
13:48
Reinstate the timeline arrow foreground color changes that were removed by check-in [7ac88481a69dd], but with fixes to avoid integer overflow. ... (check-in: 57a0143b user: drh tags: trunk)
Context
2018-06-07
13:38
In the timeline graph, avoid drawing risers to the top for timewarp nodes. ... (check-in: e8066719 user: drh tags: trunk)
00:45
Disable the feature that changes the foreground color of the graph based on the background color of the item, as the item background color no longer extends under the graph. ... (check-in: 7ac88481 user: drh tags: trunk)
2018-06-06
17:55
Fix an XSS problem in the chng= query parameter to /timeline. ... (check-in: 30f60a58 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/timeline.c.
745
746
747
748
749
750
751

752
753
754
755
756
757
758
    }
  }
  @ </table>
  if( fchngQueryInit ) db_finalize(&fchngQuery);
  timeline_output_graph_javascript(pGraph, tmFlags, iTableId);
}


/*
** Change the RGB background color given in the argument in a foreground
** color with the same hue.
*/
static const char *bg_to_fg(const char *zIn){
  int i;
  unsigned int x[3];







>







745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
    }
  }
  @ </table>
  if( fchngQueryInit ) db_finalize(&fchngQuery);
  timeline_output_graph_javascript(pGraph, tmFlags, iTableId);
}

#if 0  /* not used */
/*
** Change the RGB background color given in the argument in a foreground
** color with the same hue.
*/
static const char *bg_to_fg(const char *zIn){
  int i;
  unsigned int x[3];
775
776
777
778
779
780
781

782
783
784
785
786
787
788
    /* Make the color darker */
    static const unsigned int t = 128;
    if( mx>t ) for(i=0; i<3; i++) x[i] -= mx - t;
  }
  sqlite3_snprintf(sizeof(zRes),zRes,"#%02x%02x%02x",x[0],x[1],x[2]);
  return zRes;
}


/*
** Generate all of the necessary javascript to generate a timeline
** graph.
*/
void timeline_output_graph_javascript(
  GraphContext *pGraph,     /* The graph to be displayed */







>







776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
    /* Make the color darker */
    static const unsigned int t = 128;
    if( mx>t ) for(i=0; i<3; i++) x[i] -= mx - t;
  }
  sqlite3_snprintf(sizeof(zRes),zRes,"#%02x%02x%02x",x[0],x[1],x[2]);
  return zRes;
}
#endif /* not used */

/*
** Generate all of the necessary javascript to generate a timeline
** graph.
*/
void timeline_output_graph_javascript(
  GraphContext *pGraph,     /* The graph to be displayed */
876
877
878
879
880
881
882

883
884
885

886
887
888
889
890
891
892
        if( pRow->aiRiser[i]>0 ){
          cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
          cSep = ',';
        }
      }
      if( cSep=='[' ) cgi_printf("[");
      cgi_printf("],");

      if( colorGraph && pRow->zBgClr[0]=='#' ){
        cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
      }

      /* mi */
      cgi_printf("\"mi\":");
      cSep = '[';
      for(i=0; i<GR_MAX_RAIL; i++){
        if( pRow->mergeIn[i] ){
          int mi = i;
          if( (pRow->mergeDown >> i) & 1 ) mi = -mi;







>



>







878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
        if( pRow->aiRiser[i]>0 ){
          cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
          cSep = ',';
        }
      }
      if( cSep=='[' ) cgi_printf("[");
      cgi_printf("],");
#if 0
      if( colorGraph && pRow->zBgClr[0]=='#' ){
        cgi_printf("\"fg\":\"%s\",", bg_to_fg(pRow->zBgClr));
      }
#endif
      /* mi */
      cgi_printf("\"mi\":");
      cSep = '[';
      for(i=0; i<GR_MAX_RAIL; i++){
        if( pRow->mergeIn[i] ){
          int mi = i;
          if( (pRow->mergeDown >> i) & 1 ) mi = -mi;