d03f883260eef5e765f3c0adcee1337bdaa2437c
tdreszer
  Wed Nov 23 15:36:32 2011 -0800
Basing calc on font size has improved things, but height needs to be declared as em not pix.  Now this looks perfect in my Linux/FF but not on Katrina's.  No doubt there are still tweeks to be done.
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index fe6a9b9..53da686 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -6175,42 +6175,42 @@
 boolean labelHeight = 0;
 members_t *dimensionX = membersForAll->members[dimX];
 members_t *dimensionY = membersForAll->members[dimY];
 if(dimensionX && dimensionY)
     {
     if(dimensionX->count>MATRIX_SQUEEZE)
         {
         int ixX,cntX=0;
         for (ixX = 0; ixX < dimensionX->count; ixX++)
             {
             if(dimensionX->subtrackList && dimensionX->subtrackList[ixX] && dimensionX->subtrackList[ixX]->val)
                 {
                 cntX++;
                 char *ptr = dimensionX->titles[ixX];
                 int ttlLen = mgFontStringWidth(mgTimes10Font(), ptr);
-                ttlLen += (7 * countCase(ptr,TRUE)); // double counts upperCase letters
+                ttlLen += (6 * countCase(ptr,TRUE)); // double counts upperCase letters
                 while((ptr = strstr(ptr+1,"&nbsp;")) != NULL)   // &nbsp; dropped from calculation
                     ttlLen -= 35;
                 ptr = dimensionX->titles[ixX];
                 while((ptr = strstr(ptr+1,"<BR>")) != NULL)     // Breaks will be removed later
                     ttlLen -= 21;
                 if (labelHeight < ttlLen)
                     labelHeight = ttlLen;
                 }
             }
         if(cntX>MATRIX_SQUEEZE)
-            labelHeight = labelHeight + 30;
+            labelHeight = (labelHeight/14)+1;
         else
             labelHeight = 0;
         }
     }
 return labelHeight;
 }
 #else///ifndef MATRIX_SQUEEZE
 #define matrixSqueeze(membersForAll) 0
 #endif///ndef MATRIX_SQUEEZE
 
 static void matrixXheadingsRow1(char *db,struct trackDb *parentTdb,int squeeze, membersForAll_t* membersForAll,boolean top)
 /* prints the top row of a matrix: 'All' buttons; X titles; buttons 'All' */
 {
 members_t *dimensionX = membersForAll->members[dimX];
 members_t *dimensionY = membersForAll->members[dimY];
@@ -6223,31 +6223,31 @@
 if(dimensionX && dimensionY)
     {
     printf("<TH ALIGN=LEFT valign=%s>",top?"TOP":"BOTTOM");
     buttonsForAll();
     puts("&nbsp;All</TH>");
     }
 
 // If there is an X dimension, then titles go across the top
 if(dimensionX)
     {
     int ixX,cntX=0;
     if(dimensionY)
         {
         #ifdef MATRIX_SQUEEZE
         if(squeeze>0)
-            printf("<TH align=RIGHT style='height:%dpx;'><div class='%s'><B><EM>%s</EM></B></div></TH>",
+            printf("<TH align=RIGHT style='height:%d.2em;'><div class='%s'><B><EM>%s</EM></B></div></TH>",
                    squeeze, (top?"up45":"dn45"), dimensionX->groupTitle);
         else
         #endif///def MATRIX_SQUEEZE
             printf("<TH align=RIGHT><B><EM>%s</EM></B></TH>", dimensionX->groupTitle);
         }
     else
         printf("<TH ALIGN=RIGHT valign=%s>&nbsp;&nbsp;<B><EM>%s</EM></B></TH>",(top?"TOP":"BOTTOM"), dimensionX->groupTitle);
 
     for (ixX = 0; ixX < dimensionX->count; ixX++)
         {
         if(dimensionX->subtrackList && dimensionX->subtrackList[ixX] && dimensionX->subtrackList[ixX]->val)
             {
         #ifdef MATRIX_SQUEEZE
             if(dimensionY && squeeze>0)
                 {