RxFPC:RxDBGrid - fix cell background color on empty dataset

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6955 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75 2019-05-27 06:13:32 +00:00
parent d5a28a73ae
commit b12dffeafa
3 changed files with 22 additions and 22 deletions

View File

@ -210,7 +210,7 @@ msgid "Question"
msgstr ""
#: rxconst.sreqvalue
#, fuzzy, object-pascal-format
#, object-pascal-format, fuzzy
#| msgid "Error. Expected value for filed %s."
msgid "Error. Expected value for field %s."
msgstr "Поле %s. Вимагається значення"

View File

@ -75,7 +75,7 @@ msgid "Data changed. Save?"
msgstr "Dato cambiado. Salvar?"
#: rxdconst.sdatabasename
#, fuzzy, object-pascal-format
#, object-pascal-format, fuzzy
#| msgid "Database loocked: %s"
msgid "Database locked: %s"
msgstr "Base de Dato bloqueada: %s"

View File

@ -4700,26 +4700,26 @@ begin
CalcCellExtent(acol, arow, aRect);
PrepareCanvas(aCol, aRow, aState);
if FGroupItems.Active and Assigned(FGroupItemDrawCur) then
begin
gRect:=aRect;
aRect.Bottom:=aRect.Bottom - DefaultRowHeight - 1;
gRect.Top:=aRect.Bottom;
gRect.Bottom:=gRect.Bottom - 2;
end;
if Assigned(FOnGetCellProps) and not (gdSelected in aState) then
begin
FBackground := Canvas.Brush.Color;
FOnGetCellProps(Self, GetFieldFromGridColumn(aCol), Canvas.Font, FBackground);
Canvas.Brush.Color := FBackground;
end;
Canvas.FillRect(aRect);
DrawCellGrid(aCol, aRow, aRect, aState);
if DataSetNotEmpty then
begin
if FGroupItems.Active and Assigned(FGroupItemDrawCur) then
begin
gRect:=aRect;
aRect.Bottom:=aRect.Bottom - DefaultRowHeight - 1;
gRect.Top:=aRect.Bottom;
gRect.Bottom:=gRect.Bottom - 2;
end;
if Assigned(FOnGetCellProps) and not (gdSelected in aState) then
begin
FBackground := Canvas.Brush.Color;
FOnGetCellProps(Self, GetFieldFromGridColumn(aCol), Canvas.Font, FBackground);
Canvas.Brush.Color := FBackground;
end;
Canvas.FillRect(aRect);
DrawCellGrid(aCol, aRow, aRect, aState);
RxColumn := TRxColumn(ColumnFromGridColumn(aCol));
if Assigned(RxColumn) and Assigned(RxColumn.Field) and
Assigned(RxColumn.ImageList) then
@ -4730,8 +4730,7 @@ begin
DrawCellBitmap(RxColumn, aRect, aState, AImageIndex);
end
else
DefaultDrawCellData(aCol, aRow, aRect, aState)
;
DefaultDrawCellData(aCol, aRow, aRect, aState);
if FGroupItems.Active and Assigned(FGroupItemDrawCur) then
begin
@ -4752,6 +4751,7 @@ begin
if C.FGroupParam.FValueType <> fvtNon then
WriteTextHeader(Canvas, gRect, C.FGroupParam.DisplayText, C.FGroupParam.Alignment);
end;
end;
end
else