From 7d78de1dc6384fa9bf1881d03565fe2dac71eb8f Mon Sep 17 00:00:00 2001 From: mbirth Date: Wed, 8 Dec 2004 09:20:41 +0000 Subject: [PATCH] modified History.txt modified KBLVisualizerU.pas -font size now depends on key height -if a key has unicode 0000 it is not displayed --- History.txt | 1 + KBLVisualizerU.pas | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/History.txt b/History.txt index f7a9513..4c4da60 100644 --- a/History.txt +++ b/History.txt @@ -9,6 +9,7 @@ x Fixed, + Added, * Improved/Changed, i Information x : Memo field now jumps to cursor position after key was clicked * : more optimizations +* : font size now depends on key height 2004-02-20 (1.2) diff --git a/KBLVisualizerU.pas b/KBLVisualizerU.pas index 2da09d5..91e5788 100644 --- a/KBLVisualizerU.pas +++ b/KBLVisualizerU.pas @@ -419,7 +419,9 @@ begin Pen.Color := clBlack; Font.Name := 'Arial'; Font.Color := clBlack; - Font.Size := 8; + Font.Height := ((map.bottom-map.top) DIV map.rows)-4; + if (Font.Height>22) then Font.Height := 22; + if (Font.Height<12) then Font.Height := 12; Rectangle(Rect(map.oleft, map.otop, map.oright+1, map.obottom+1)); FillRect(Rect(map.left, map.top, map.right+1, map.bottom+1)); for i:=0 to Length(map.Data)-1 do begin @@ -432,7 +434,7 @@ begin hicol := clBlack; Pen.Width := 1; end; - Keyrect(map, i, j, keyindex, map.Data[i].keys[j].legend, hicol); + if (map.Data[i].keys[j].value<>'0000') then Keyrect(map, i, j, keyindex, map.Data[i].keys[j].legend, hicol); if (exoc) then begin exoc := false; Exit;