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,11 +1316,27 @@ end;
|
|||||||
|
|
||||||
procedure TRxDBGrid.OutCaptionCellText(aCol, aRow: Integer;const aRect: TRect;
|
procedure TRxDBGrid.OutCaptionCellText(aCol, aRow: Integer;const aRect: TRect;
|
||||||
aState: TGridDrawState; const ACaption: string);
|
aState: TGridDrawState; const ACaption: string);
|
||||||
|
var
|
||||||
|
T1, T2:TTextStyle;
|
||||||
begin
|
begin
|
||||||
Canvas.FillRect(aRect);
|
if (TitleStyle=tsNative) then
|
||||||
|
DrawThemedCell(aCol, aRow, aRect, aState)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
// Canvas.FillRect(aRect);
|
||||||
DrawCellGrid(aCol, aRow, aRect, aState);
|
DrawCellGrid(aCol, aRow, aRect, aState);
|
||||||
|
end;
|
||||||
|
|
||||||
if ACaption <> '' then
|
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))
|
WriteTextHeader(Canvas, aRect, ACaption, GetColumnAlignment(aCol, true))
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.OutCaptionCellText90(aCol,aRow: Integer;const aRect: TRect;
|
procedure TRxDBGrid.OutCaptionCellText90(aCol,aRow: Integer;const aRect: TRect;
|
||||||
@ -1328,8 +1344,14 @@ procedure TRxDBGrid.OutCaptionCellText90(aCol,aRow: Integer;const aRect: TRect;
|
|||||||
var
|
var
|
||||||
dW, dY:integer;
|
dW, dY:integer;
|
||||||
begin
|
begin
|
||||||
|
if (TitleStyle=tsNative) then
|
||||||
|
DrawThemedCell(aCol, aRow, aRect, aState)
|
||||||
|
else
|
||||||
|
begin
|
||||||
Canvas.FillRect(aRect);
|
Canvas.FillRect(aRect);
|
||||||
DrawCellGrid(aCol,aRow,aRect,aState);
|
DrawCellGrid(aCol,aRow,aRect,aState);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
if TextOrient in [toVertical90, toVertical270] then
|
if TextOrient in [toVertical90, toVertical270] then
|
||||||
begin
|
begin
|
||||||
@ -1532,7 +1554,12 @@ begin
|
|||||||
Canvas.FillRect(aRect);
|
Canvas.FillRect(aRect);
|
||||||
if F_Clicked then
|
if F_Clicked then
|
||||||
aState:= aState + [gdPushed];
|
aState:= aState + [gdPushed];
|
||||||
|
|
||||||
|
if (TitleStyle=tsNative) then
|
||||||
|
DrawThemedCell(aCol, aRow, aRect, aState)
|
||||||
|
else
|
||||||
DrawCellGrid(aCol,aRow, aRect, aState);
|
DrawCellGrid(aCol,aRow, aRect, aState);
|
||||||
|
|
||||||
if DatalinkActive and (rdgAllowToolMenu in FOptionsRx) then
|
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);
|
Canvas.Draw((ARect.Left+ARect.Right-F_MenuBMP.Width) div 2,(ARect.Top + ARect.Bottom - F_MenuBMP.Height) div 2, F_MenuBMP);
|
||||||
exit;
|
exit;
|
||||||
|
@ -251,23 +251,23 @@ uses Windows;
|
|||||||
|
|
||||||
function StrToOem(const AnsiStr: string): string;
|
function StrToOem(const AnsiStr: string): string;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
SetLength(Result, Length(AnsiStr));
|
SetLength(Result, Length(AnsiStr));
|
||||||
if Length(Result) > 0 then
|
if Length(Result) > 0 then
|
||||||
{$IFDEF WIN32}
|
|
||||||
CharToOemBuff(PChar(AnsiStr), PChar(Result), Length(Result));
|
CharToOemBuff(PChar(AnsiStr), PChar(Result), Length(Result));
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
// AnsiToOemBuff(@AnsiStr[1], @Result[1], Length(Result));
|
Result:=AnsiStr;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function OemToAnsiStr(const OemStr: string): string;
|
function OemToAnsiStr(const OemStr: string): string;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
SetLength(Result, Length(OemStr));
|
SetLength(Result, Length(OemStr));
|
||||||
if Length(Result) > 0 then
|
if Length(Result) > 0 then
|
||||||
{$IFDEF WIN32}
|
|
||||||
OemToCharBuff(PChar(OemStr), PChar(Result), Length(Result));
|
OemToCharBuff(PChar(OemStr), PChar(Result), Length(Result));
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
// OemToAnsiBuff(@OemStr[1], @Result[1], Length(Result));
|
Result:=OemStr;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ begin
|
|||||||
I := I div 4;
|
I := I div 4;
|
||||||
end;
|
end;
|
||||||
Result.X := I;
|
Result.X := I;
|
||||||
Result.Y := I;
|
Result.Y := I div 4;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user