diff --git a/components/rx/rxdbgrid.pas b/components/rx/rxdbgrid.pas index 8da91df88..f886f25fe 100644 --- a/components/rx/rxdbgrid.pas +++ b/components/rx/rxdbgrid.pas @@ -1316,11 +1316,27 @@ end; procedure TRxDBGrid.OutCaptionCellText(aCol, aRow: Integer;const aRect: TRect; aState: TGridDrawState; const ACaption: string); +var + T1, T2:TTextStyle; begin - Canvas.FillRect(aRect); - DrawCellGrid(aCol, aRow, aRect, aState); + 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; @@ -1328,8 +1344,14 @@ procedure TRxDBGrid.OutCaptionCellText90(aCol,aRow: Integer;const aRect: TRect; var dW, dY:integer; begin - Canvas.FillRect(aRect); - DrawCellGrid(aCol,aRow,aRect,aState); + 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]; - DrawCellGrid(aCol,aRow, aRect, aState); + + 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; diff --git a/components/rx/rxstrutils.pas b/components/rx/rxstrutils.pas index 6f0556e7c..e3adf60b1 100644 --- a/components/rx/rxstrutils.pas +++ b/components/rx/rxstrutils.pas @@ -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; diff --git a/components/rx/tooledit.pas b/components/rx/tooledit.pas index ef0d70a77..a4ebeb8dc 100644 --- a/components/rx/tooledit.pas +++ b/components/rx/tooledit.pas @@ -258,7 +258,7 @@ begin I := I div 4; end; Result.X := I; - Result.Y := I; + Result.Y := I div 4; end; end; end;