src/hg/hgTracks/simpleTracks.c 1.130
1.130 2010/04/01 03:18:02 markd
If label area width exceeds 1/2 of image width, set to 1/2 of width instead of default.
Index: src/hg/hgTracks/simpleTracks.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/simpleTracks.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -b -B -U 4 -r1.129 -r1.130
--- src/hg/hgTracks/simpleTracks.c 25 Mar 2010 17:11:09 -0000 1.129
+++ src/hg/hgTracks/simpleTracks.c 1 Apr 2010 03:18:02 -0000 1.130
@@ -233,10 +233,11 @@
leftLabelWidthChars = leftLabelWidthDefaultChars;
tl.leftLabelWidth = leftLabelWidthChars*tl.nWidth + trackTabWidth;
if (tl.leftLabelWidth > 0.5*tl.picWidth)
{
- leftLabelWidthChars = leftLabelWidthDefaultChars;
- tl.leftLabelWidth = leftLabelWidthChars*tl.nWidth + trackTabWidth;
+ // overflow, force to 1/2 width
+ tl.leftLabelWidth = 0.5*tl.picWidth;
+ leftLabelWidthChars = tl.leftLabelWidth/tl.nWidth;
}
}
static boolean isTooLightForTextOnWhite(struct hvGfx *hvg, Color color)