mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:59:06 +02:00
ide: show hint modifier for some identifiers
git-svn-id: trunk@30688 -
This commit is contained in:
parent
a823a1c12a
commit
a415be4b0a
@ -112,6 +112,16 @@ function PaintCompletionItem(const AKey: string; ACanvas: TCanvas;
|
|||||||
X, Y, MaxX: integer; ItemSelected: boolean; Index: integer;
|
X, Y, MaxX: integer; ItemSelected: boolean; Index: integer;
|
||||||
aCompletion : TSynCompletion; CurrentCompletionType: TCompletionType;
|
aCompletion : TSynCompletion; CurrentCompletionType: TCompletionType;
|
||||||
Highlighter: TSrcIDEHighlighter; MeasureOnly: Boolean): TPoint;
|
Highlighter: TSrcIDEHighlighter; MeasureOnly: Boolean): TPoint;
|
||||||
|
|
||||||
|
const
|
||||||
|
HintModifierImage: array[TPascalHintModifier] of String = (
|
||||||
|
{ phmDeprecated } 'ce_deprecated',
|
||||||
|
{ phmPlatform } 'ce_platform',
|
||||||
|
{ phmLibrary } 'ce_library',
|
||||||
|
{ phmUnimplemented } 'ce_unimplemented',
|
||||||
|
{ phmExperimental } 'ce_experimental'
|
||||||
|
);
|
||||||
|
|
||||||
var
|
var
|
||||||
BGRed: Integer;
|
BGRed: Integer;
|
||||||
BGGreen: Integer;
|
BGGreen: Integer;
|
||||||
@ -225,6 +235,7 @@ var
|
|||||||
IsReadOnly: boolean;
|
IsReadOnly: boolean;
|
||||||
ImageIndex: longint;
|
ImageIndex: longint;
|
||||||
HintModifiers: TPascalHintModifiers;
|
HintModifiers: TPascalHintModifiers;
|
||||||
|
HintModifier: TPascalHintModifier;
|
||||||
begin
|
begin
|
||||||
ForegroundColor := ColorToRGB(ACanvas.Font.Color);
|
ForegroundColor := ColorToRGB(ACanvas.Font.Color);
|
||||||
Result.X := 0;
|
Result.X := 0;
|
||||||
@ -344,10 +355,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
ACanvas.Font.Style:=ACanvas.Font.Style-[fsBold];
|
ACanvas.Font.Style:=ACanvas.Font.Style-[fsBold];
|
||||||
|
|
||||||
if ImageIndex<0 then begin
|
if ImageIndex <= 0 then
|
||||||
HintModifiers:=IdentItem.GetHintModifiers;
|
begin
|
||||||
if HintModifiers<>[] then
|
HintModifiers := IdentItem.GetHintModifiers;
|
||||||
ImageIndex:=IDEImages.LoadImage(16,'ce_property_readonly');
|
for HintModifier in HintModifiers do
|
||||||
|
begin
|
||||||
|
ImageIndex := IDEImages.LoadImage(16, HintModifierImage[HintModifier]);
|
||||||
|
break;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// paint icon
|
// paint icon
|
||||||
|
Loading…
Reference in New Issue
Block a user