You've already forked lazarus-ccr
fix error on draw rxdbgrid title
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1374 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1316,20 +1316,42 @@ end;
|
||||
|
||||
procedure TRxDBGrid.OutCaptionCellText(aCol, aRow: Integer;const aRect: TRect;
|
||||
aState: TGridDrawState; const ACaption: string);
|
||||
var
|
||||
T1, T2:TTextStyle;
|
||||
begin
|
||||
Canvas.FillRect(aRect);
|
||||
if (TitleStyle=tsNative) then
|
||||
DrawThemedCell(aCol, aRow, aRect, aState)
|
||||
else
|
||||
begin
|
||||
// Canvas.FillRect(aRect);
|
||||
DrawCellGrid(aCol, aRow, aRect, aState);
|
||||
end;
|
||||
|
||||
if ACaption <> '' then
|
||||
begin
|
||||
{ T1:=Canvas.TextStyle;
|
||||
T2:=T1;
|
||||
T1.Wordbreak:=true;
|
||||
Canvas.TextStyle:=T1;
|
||||
DrawCellText(aCol, aRow, aRect, aState, ACaption);
|
||||
Canvas.TextStyle:=T2; }
|
||||
WriteTextHeader(Canvas, aRect, ACaption, GetColumnAlignment(aCol, true))
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.OutCaptionCellText90(aCol,aRow: Integer;const aRect: TRect;
|
||||
aState: TGridDrawState;const ACaption:string; const TextOrient:TTextOrientation);
|
||||
var
|
||||
dW, dY:integer;
|
||||
begin
|
||||
if (TitleStyle=tsNative) then
|
||||
DrawThemedCell(aCol, aRow, aRect, aState)
|
||||
else
|
||||
begin
|
||||
Canvas.FillRect(aRect);
|
||||
DrawCellGrid(aCol,aRow,aRect,aState);
|
||||
end;
|
||||
|
||||
|
||||
if TextOrient in [toVertical90, toVertical270] then
|
||||
begin
|
||||
@ -1532,7 +1554,12 @@ begin
|
||||
Canvas.FillRect(aRect);
|
||||
if F_Clicked then
|
||||
aState:= aState + [gdPushed];
|
||||
|
||||
if (TitleStyle=tsNative) then
|
||||
DrawThemedCell(aCol, aRow, aRect, aState)
|
||||
else
|
||||
DrawCellGrid(aCol,aRow, aRect, aState);
|
||||
|
||||
if DatalinkActive and (rdgAllowToolMenu in FOptionsRx) then
|
||||
Canvas.Draw((ARect.Left+ARect.Right-F_MenuBMP.Width) div 2,(ARect.Top + ARect.Bottom - F_MenuBMP.Height) div 2, F_MenuBMP);
|
||||
exit;
|
||||
|
@ -251,23 +251,23 @@ uses Windows;
|
||||
|
||||
function StrToOem(const AnsiStr: string): string;
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
SetLength(Result, Length(AnsiStr));
|
||||
if Length(Result) > 0 then
|
||||
{$IFDEF WIN32}
|
||||
CharToOemBuff(PChar(AnsiStr), PChar(Result), Length(Result));
|
||||
{$ELSE}
|
||||
// AnsiToOemBuff(@AnsiStr[1], @Result[1], Length(Result));
|
||||
Result:=AnsiStr;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function OemToAnsiStr(const OemStr: string): string;
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
SetLength(Result, Length(OemStr));
|
||||
if Length(Result) > 0 then
|
||||
{$IFDEF WIN32}
|
||||
OemToCharBuff(PChar(OemStr), PChar(Result), Length(Result));
|
||||
{$ELSE}
|
||||
// OemToAnsiBuff(@OemStr[1], @Result[1], Length(Result));
|
||||
Result:=OemStr;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
@ -258,7 +258,7 @@ begin
|
||||
I := I div 4;
|
||||
end;
|
||||
Result.X := I;
|
||||
Result.Y := I;
|
||||
Result.Y := I div 4;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user