RxDBGrid - fix draw themed vertical collumn caption

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2512 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75 2012-09-15 19:41:36 +00:00
parent 2ed8374ace
commit ffd4b105f4
2 changed files with 9 additions and 1 deletions

View File

@ -1643,7 +1643,7 @@ begin
begin
if rxTit.Orientation in [toVertical270, toVertical90] then
H := Max((tmpCanvas.TextWidth(Columns[i].Title.Caption) +
tmpCanvas.TextWidth('W')) div DefaultRowHeight, H)
tmpCanvas.TextWidth('W')*2) div DefaultRowHeight, H)
else
begin
rxColNext := nil;

View File

@ -222,8 +222,16 @@ var
L:integer;
begin
L:=Canvas.Font.Orientation;
SetBkMode(Canvas.Handle, TRANSPARENT);
Canvas.Font.Orientation:=RotDegree * 10;
Canvas.TextOut(X, Y, St);
{ DrawText(ACanvas.Handle, PChar(Text), Length(Text), DrawRect,
ALIGN_FLAGS_HEADER[Alignment] or DT_WORDBREAK
);}
Canvas.Font.Orientation:=L;
end;