mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Follow up to rev 1156: Enhance readability of selected NULL cells with grey font color: Just use the default font color clWindowText in those cases.
User report: http://www.heidisql.com/forum/viewtopic.php?p=1753 Code inspired by: http://qc.codegear.com/wc/qcmain.aspx?d=3009
This commit is contained in:
@ -4863,7 +4863,10 @@ begin
|
||||
Grid := Sender as TTntDBGrid;
|
||||
if (Grid.Fields[DataCol] <> nil) and Grid.Fields[DataCol].IsNull then
|
||||
begin
|
||||
Grid.Canvas.Font.Color := COLOR_NULLVALUE;
|
||||
if (Grid.SelectedRows.IndexOf(Grid.DataSource.DataSet.Bookmark) <> -1) or (gdSelected in State) then
|
||||
Grid.Canvas.Font.Color := clWindowText
|
||||
else
|
||||
Grid.Canvas.Font.Color := COLOR_NULLVALUE;
|
||||
// Just use the changed font color for (MEMO) and (BLOB) cells
|
||||
if Grid.Fields[DataCol].DataType in [ftMemo, ftBlob] then
|
||||
Grid.DefaultDrawColumnCell(Rect, DataCol, Grid.Columns[DataCol], State)
|
||||
|
Reference in New Issue
Block a user