mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-25 15:09:24 +02:00
color code $Warning messages from Graeme
git-svn-id: trunk@8812 -
This commit is contained in:
parent
c03e8cd810
commit
060676d981
@ -794,7 +794,6 @@ begin
|
|||||||
ExecuteIDEShortCut(Self, Key, Shift);
|
ExecuteIDEShortCut(Self, Key, Shift);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
procedure TMessagesView.MessageViewDrawItem(Control: TWinControl;
|
procedure TMessagesView.MessageViewDrawItem(Control: TWinControl;
|
||||||
Index: Integer; ARect: TRect; State: TOwnerDrawState);
|
Index: Integer; ARect: TRect; State: TOwnerDrawState);
|
||||||
var
|
var
|
||||||
@ -803,8 +802,10 @@ var
|
|||||||
const
|
const
|
||||||
cHint = 'Hint: User defined:';
|
cHint = 'Hint: User defined:';
|
||||||
cNote = 'Note: User defined:';
|
cNote = 'Note: User defined:';
|
||||||
|
cWarning = 'Warning: User defined:';
|
||||||
clMsgHint = clBlue;
|
clMsgHint = clBlue;
|
||||||
clMsgNote = clGreen;
|
clMsgNote = clGreen;
|
||||||
|
clMsgWarning = clRed;
|
||||||
cLeftSpacer = 3;
|
cLeftSpacer = 3;
|
||||||
begin
|
begin
|
||||||
MessageListBox.Canvas.FillRect(ARect);
|
MessageListBox.Canvas.FillRect(ARect);
|
||||||
@ -815,17 +816,18 @@ begin
|
|||||||
{ Only use custom colors if not selected, otherwise it is difficult to read }
|
{ Only use custom colors if not selected, otherwise it is difficult to read }
|
||||||
if not (odSelected in State)
|
if not (odSelected in State)
|
||||||
then begin
|
then begin
|
||||||
if Pos(cNote, TheText) > 0
|
if Pos(cNote, TheText) > 0 then
|
||||||
then MessageListBox.Canvas.Font.Color := clMsgNote
|
MessageListBox.Canvas.Font.Color := clMsgNote
|
||||||
else if Pos(cHint, TheText) > 0
|
else if Pos(cHint, TheText) > 0 then
|
||||||
then MessageListBox.Canvas.Font.Color := clMsgHint
|
MessageListBox.Canvas.Font.Color := clMsgHint
|
||||||
|
else if Pos(cWarning, TheText) > 0 then
|
||||||
|
MessageListBox.Canvas.Font.Color := clMsgWarning;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
MessageListBox.Canvas.TextOut(ARect.Left + cLeftSpacer, ARect.Top + 1, TheText);
|
MessageListBox.Canvas.TextOut(ARect.Left + cLeftSpacer, ARect.Top + 1, TheText);
|
||||||
MessageListBox.Canvas.Font.Color := cl; // restore original color
|
MessageListBox.Canvas.Font.Color := cl; // restore original color
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
procedure TMessagesView.SaveAllToFileMenuItemClick(Sender: TObject);
|
procedure TMessagesView.SaveAllToFileMenuItemClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
SaveDialog: TSaveDialog;
|
SaveDialog: TSaveDialog;
|
||||||
|
Loading…
Reference in New Issue
Block a user