Markup Text in Evaluator Columns not centered properly

Using a return in an evaluator column for extension like so -
<kbd><b>" + ext + "</b></kbd>
gives pleasing result like so
image

except the text is not exactly centered vertically within the <kbd> rectangle.
Please fix.

I think that's more an issue with the font you've chosen than anything else.

Most fonts center capital letters and have most lowercase letters slightly lower than them, but that font looks like it has them even lower than normal.

That evaluator column looks interesting. Can you please share (parts of) it, esp. the icon "generation". Thanks.

1 Like

work in progress, but you can modify.
Also the icon names might point to custom icons not present in your icon sets.

Copy & paste

Extension+
<?xml version="1.0"?>
<evalcolumn align="0" attrrefresh="no" autorefresh="no" category="loc" customgrouping="yes" foldertype="all" header="Ext+" keyword="ext+" maxstars="5" namerefresh="yes" nocache="yes" reversesort="no" supportmarkup="yes" title="Extension+" type="0">// folders

if (operation != &quot;markup&quot;) return ext;

If (is_dir)
{
  if (extdir == &quot;&lt;symlinkd&gt;&quot;) return &quot;&lt;%tbim:link&gt; &lt;kbd&gt;&quot; + &quot;Folder&quot; + &quot;&lt;/kbd&gt;&quot;;
  if (extdir == &quot;&lt;junction&gt;&quot;) return &quot;&lt;%tbim:junction&gt; &lt;kbd&gt;&quot; + &quot;Folder&quot; + &quot;&lt;/kbd&gt;&quot;;

  return &quot;&lt;%tbim:folder&gt; &lt;kbd&gt;&quot; + &quot;Folder&quot; + &quot;&lt;/kbd&gt;&quot;
}

// shortcuts
elseif (ext == &quot;lnk&quot;)
{
  return &quot;&lt;%tbim:undo&gt; &quot; + &quot;Shortcut&quot;;
  return &quot;&lt;%tbim:undo&gt; &lt;kbd&gt;&quot; + &quot;Shortcut&quot; + &quot;&lt;/kbd&gt;&quot;;
}

// hard links - only if Link Count is showing
elseif (linkcount == 2)
{
  return &quot;&lt;%tbim:link1&gt; &quot; + ext;
}

// soft links
elseif (Match(ext, &quot;&lt;.*&gt;&quot;, &quot;r&quot;))
{
  return &quot;&lt;%tbim:link&gt; &quot; + ext;
  return &quot;&lt;%tbim:link&gt; &lt;kbd&gt;&quot; + ext + &quot;&lt;/kbd&gt;&quot;;
}

// url
elseif (Match(ext, &quot;url&quot;))
{
  return &quot;&lt;%tbim:ftpconnect&gt; &quot; + ext;
  return &quot;&lt;%tbim:ftpconnect&gt; &lt;kbd&gt;&quot; + ext + &quot;&lt;/kbd&gt;&quot;;
}

// programs
elseif (Match(file_name, &quot;grp:Programs&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:windowexecutable&gt; &quot; + ext;
  return &quot;&lt;%tbim:windowexecutable&gt; &lt;kbd&gt;&quot; + ext + &quot;&lt;/kbd&gt;&quot;;
  return &quot;&lt;%tbim:alert&gt; &lt;kbd&gt;&quot; + ext + &quot;&lt;/kbd&gt;&quot;;
}

// archives
elseif (Match(file_name, &quot;grp:Archives&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:zip&gt; &quot; + ext;
  return &quot;&lt;%tbim:archive (3)&gt; &quot; + ext;
  return &quot;&lt;%tbim:archive (2)&gt; &quot; + ext;
  return &quot;&lt;%tbim:archive&gt; &quot; + ext;
  return &quot;&lt;%tbim:archive (1)&gt; &quot; + ext;
}

// Music
elseif (Match(file_name, &quot;grp:Music&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:music&gt; &quot; + ext;
}

// code
elseif (Match(file_name, &quot;grp:Code&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:code&gt; &quot; + ext;
}

// text
elseif (Match(file_name, &quot;grp:Text&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:text&gt; &quot; + ext;
}

// documents
elseif (Match(file_name, &quot;grp:Documents&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:document&gt; &quot; + ext;
}

// pdf
elseif (Match(ext, &quot;pdf&quot;))
{
  return &quot;&lt;%tbim:pdf&gt; &quot; + ext;
  return &quot;&lt;%tbim:pdf&gt; &lt;kbd&gt;&quot; + ext + &quot;&lt;/kbd&gt;&quot;;
}

// eBooks
elseif (Match(file_name, &quot;grp:eBooks&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:book1&gt; &quot; + ext;
  return &quot;&lt;%tbim:book&gt; &quot; + ext;
}


// Directory Opus
elseif (Match(file_name, &quot;grp:Directory Opus&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:releasenotes&gt; &quot; + ext;
  return &quot;&lt;%tbim:Dopus&gt; &quot; + ext;
}

// images
elseif (Match(file_name, &quot;grp:Images&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:graphics2&gt; &quot; + ext;
  return &quot;&lt;%tbim:graphics2&gt; &lt;kbd&gt;&quot; + ext + &quot;&lt;/kbd&gt;&quot;;
}

// movies
elseif (Match(file_name, &quot;grp:Movies&quot;, &quot;f&quot;)) 
{
  return &quot;&lt;%tbim:video2&gt; &quot; + ext;
  return &quot;&lt;%tbim:video3&gt; &lt;kbd&gt;&quot; + ext + &quot;&lt;/kbd&gt;&quot;;
}

// rest of files
else
{
  return &quot;&lt;%tbim:paper&gt; &quot; + ext;
  return &quot;&lt;%tbim:paper&gt; &lt;kbd&gt;&quot; + ext + &quot;&lt;/kbd&gt;&quot;;
}
</evalcolumn>
1 Like