mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 19:39:28 +02:00
IDE issues: use IDEImageIntf instead of separate imagelist
git-svn-id: trunk@14299 -
This commit is contained in:
parent
a37ee688c7
commit
a6dd95e3b2
@ -32,7 +32,8 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, InterfaceBase, LCLProc, LResources, Contnrs, Forms, Controls, Graphics,
|
Classes, SysUtils, InterfaceBase, LCLProc, LResources, Contnrs, Forms, Controls, Graphics,
|
||||||
Dialogs, StdCtrls, ComCtrls, CompatibilityIssues, IDEOptionDefs, LazarusIDEStrConsts,
|
Dialogs, StdCtrls, ComCtrls, CompatibilityIssues, IDEOptionDefs, LazarusIDEStrConsts,
|
||||||
EnvironmentOpts, Masks, ComponentReg, ObjectInspector, ExtCtrls, Buttons, LazConf;
|
IDEImagesIntf, EnvironmentOpts, Masks, ComponentReg, ObjectInspector, ExtCtrls, Buttons,
|
||||||
|
LazConf;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TIssueBrowserView }
|
{ TIssueBrowserView }
|
||||||
@ -76,7 +77,7 @@ begin
|
|||||||
|
|
||||||
IssueFilterGroupBox.Caption := lisFilterIssues;
|
IssueFilterGroupBox.Caption := lisFilterIssues;
|
||||||
NameLabel.Caption := lisCodeToolsDefsName;
|
NameLabel.Caption := lisCodeToolsDefsName;
|
||||||
IssueTreeView.Images := WidgetSetImageList;
|
IssueTreeView.Images := IDEImages.Images_16;
|
||||||
|
|
||||||
X := 10;
|
X := 10;
|
||||||
// create widget set filter buttons
|
// create widget set filter buttons
|
||||||
@ -93,7 +94,7 @@ begin
|
|||||||
Down := True;
|
Down := True;
|
||||||
AllowAllUp := True;
|
AllowAllUp := True;
|
||||||
|
|
||||||
WidgetSetImageList.GetBitmap(Integer(P), Glyph);
|
IDEImages.Images_16.GetBitmap(IDEImages.LoadImage(16, WidgetSetImageNames[P]), Glyph);
|
||||||
ShowHint := True;
|
ShowHint := True;
|
||||||
Hint := LCLPlatformDisplayNames[P];
|
Hint := LCLPlatformDisplayNames[P];
|
||||||
OnClick := @NameFilterEditChange;
|
OnClick := @NameFilterEditChange;
|
||||||
@ -136,7 +137,7 @@ var
|
|||||||
IssueProperty: String;
|
IssueProperty: String;
|
||||||
IssueMask: TMaskList;
|
IssueMask: TMaskList;
|
||||||
S, M: String;
|
S, M: String;
|
||||||
I: PtrInt;
|
I, ID: PtrInt;
|
||||||
Issues: TStringList;
|
Issues: TStringList;
|
||||||
Issue: TIssue;
|
Issue: TIssue;
|
||||||
C: TClass;
|
C: TClass;
|
||||||
@ -233,10 +234,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
with IssueTreeView.Items.AddChild(nil, Issues[I]) do
|
with IssueTreeView.Items.AddChild(nil, Issues[I]) do
|
||||||
begin
|
begin
|
||||||
ImageIndex := Integer(FIssueList[Integer(Issues.Objects[I])].WidgetSet);
|
ID := Integer(Issues.Objects[I]);
|
||||||
|
|
||||||
|
ImageIndex := IDEImages.LoadImage(16, WidgetSetImageNames[FIssueList[ID].WidgetSet]);
|
||||||
StateIndex := ImageIndex;
|
StateIndex := ImageIndex;
|
||||||
SelectedIndex := ImageIndex;
|
SelectedIndex := ImageIndex;
|
||||||
Data := @FIssueList[Integer(Issues.Objects[I])];
|
|
||||||
|
Data := @FIssueList[ID];
|
||||||
end;
|
end;
|
||||||
if NameFilterEdit.Text = Issues[I] then
|
if NameFilterEdit.Text = Issues[I] then
|
||||||
begin
|
begin
|
||||||
|
@ -11,6 +11,7 @@ object ObjectInspectorDlg: TObjectInspectorDlg
|
|||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
OnResize = ObjectInspectorResize
|
OnResize = ObjectInspectorResize
|
||||||
PopupMenu = MainPopupMenu
|
PopupMenu = MainPopupMenu
|
||||||
|
LCLVersion = '0.9.25'
|
||||||
object StatusBar: TStatusBar
|
object StatusBar: TStatusBar
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 649
|
Top = 649
|
||||||
|
@ -5,12 +5,12 @@ LazarusResources.Add('TObjectInspectorDlg','FORMDATA',[
|
|||||||
+#3#157#2#3'Top'#3#175#0#5'Width'#3#19#1#18'HorzScrollBar.Page'#3#18#1#18'Ver'
|
+#3#157#2#3'Top'#3#175#0#5'Width'#3#19#1#18'HorzScrollBar.Page'#3#18#1#18'Ver'
|
||||||
+'tScrollBar.Page'#3#156#2#7'Caption'#6#18'ObjectInspectorDlg'#12'ClientHeigh'
|
+'tScrollBar.Page'#3#156#2#7'Caption'#6#18'ObjectInspectorDlg'#12'ClientHeigh'
|
||||||
+'t'#3#157#2#11'ClientWidth'#3#19#1#10'KeyPreview'#9#8'OnResize'#7#21'ObjectI'
|
+'t'#3#157#2#11'ClientWidth'#3#19#1#10'KeyPreview'#9#8'OnResize'#7#21'ObjectI'
|
||||||
+'nspectorResize'#9'PopupMenu'#7#13'MainPopupMenu'#0#10'TStatusBar'#9'StatusB'
|
+'nspectorResize'#9'PopupMenu'#7#13'MainPopupMenu'#10'LCLVersion'#6#6'0.9.25'
|
||||||
+'ar'#6'Height'#2#20#3'Top'#3#137#2#5'Width'#3#19#1#6'Panels'#14#1#5'Width'#2
|
+#0#10'TStatusBar'#9'StatusBar'#6'Height'#2#20#3'Top'#3#137#2#5'Width'#3#19#1
|
||||||
+'d'#0#1#5'Width'#2'2'#0#0#11'SimplePanel'#8#0#0#9'TComboBox'#23'AvailPersist'
|
+#6'Panels'#14#1#5'Width'#2'd'#0#1#5'Width'#2'2'#0#0#11'SimplePanel'#8#0#0#9
|
||||||
+'entComboBox'#6'Height'#2#21#5'Width'#3#19#1#5'Align'#7#5'alTop'#16'AutoComp'
|
+'TComboBox'#23'AvailPersistentComboBox'#6'Height'#2#21#5'Width'#3#19#1#5'Ali'
|
||||||
+'leteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#10'ItemH'
|
+'gn'#7#5'alTop'#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactS'
|
||||||
+'eight'#2#13#9'OnCloseUp'#7#20'AvailComboBoxCloseUp'#8'TabOrder'#2#0#0#0#10
|
+'earchAscending'#0#10'ItemHeight'#2#13#9'OnCloseUp'#7#20'AvailComboBoxCloseU'
|
||||||
+'TPopupMenu'#13'MainPopupMenu'#7'OnPopup'#7#20'OnMainPopupMenuPopup'#4'left'
|
+'p'#8'TabOrder'#2#0#0#0#10'TPopupMenu'#13'MainPopupMenu'#7'OnPopup'#7#20'OnM'
|
||||||
+#2#9#3'top'#2#11#0#0#0
|
+'ainPopupMenuPopup'#4'left'#2#9#3'top'#2#11#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -734,8 +734,18 @@ const
|
|||||||
|
|
||||||
function CompareOIFavouriteProperties(Data1, Data2: Pointer): integer;
|
function CompareOIFavouriteProperties(Data1, Data2: Pointer): integer;
|
||||||
|
|
||||||
var
|
|
||||||
WidgetSetImageList: TImageList;
|
const
|
||||||
|
WidgetSetImageNames: array [TLCLPlatform] of shortstring = (
|
||||||
|
'issue_gtk',
|
||||||
|
'issue_gtk2',
|
||||||
|
'issue_win32',
|
||||||
|
'issue_wince',
|
||||||
|
'issue_carbon',
|
||||||
|
'issue_qt',
|
||||||
|
'issue_fpgui',
|
||||||
|
'issue_nogui'
|
||||||
|
);
|
||||||
|
|
||||||
//******************************************************************************
|
//******************************************************************************
|
||||||
|
|
||||||
@ -2241,7 +2251,7 @@ begin
|
|||||||
|
|
||||||
// draw widgetsets
|
// draw widgetsets
|
||||||
X := NameRect.Right - 2;
|
X := NameRect.Right - 2;
|
||||||
Y := (NameRect.Top + NameRect.Bottom - WidgetSetImageList.Height) div 2;
|
Y := (NameRect.Top + NameRect.Bottom - IDEImages.Images_16.Height) div 2;
|
||||||
OldFont:=Font;
|
OldFont:=Font;
|
||||||
Font:=FNameFont;
|
Font:=FNameFont;
|
||||||
Font.Color := clRed;
|
Font.Color := clRed;
|
||||||
@ -2249,8 +2259,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
if Platform in CurRow.FWidgetSets then
|
if Platform in CurRow.FWidgetSets then
|
||||||
begin
|
begin
|
||||||
Dec(X, WidgetSetImageList.Width);
|
Dec(X, IDEImages.Images_16.Width);
|
||||||
WidgetSetImageList.Draw(Canvas, X, Y, Integer(Platform));
|
IDEImages.Images_16.Draw(Canvas, X, Y, IDEImages.LoadImage(16, WidgetSetImageNames[Platform]));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Font:=OldFont;
|
Font:=OldFont;
|
||||||
@ -3193,19 +3203,6 @@ begin
|
|||||||
FShowFavorites := False;
|
FShowFavorites := False;
|
||||||
FShowIssues := False;
|
FShowIssues := False;
|
||||||
|
|
||||||
WidgetSetImageList := TImageList.Create(Self);
|
|
||||||
WidgetSetImageList.Width := 16;
|
|
||||||
WidgetSetImageList.Height := 16;
|
|
||||||
|
|
||||||
WidgetSetImageList.AddLazarusResource('issue_gtk');
|
|
||||||
WidgetSetImageList.AddLazarusResource('issue_gtk2');
|
|
||||||
WidgetSetImageList.AddLazarusResource('issue_win32');
|
|
||||||
WidgetSetImageList.AddLazarusResource('issue_wince');
|
|
||||||
WidgetSetImageList.AddLazarusResource('issue_carbon');
|
|
||||||
WidgetSetImageList.AddLazarusResource('issue_qt');
|
|
||||||
WidgetSetImageList.AddLazarusResource('issue_fpgui');
|
|
||||||
WidgetSetImageList.AddLazarusResource('issue_nogui');
|
|
||||||
|
|
||||||
Caption := oisObjectInspector;
|
Caption := oisObjectInspector;
|
||||||
StatusBar.SimpleText:=oisAll;
|
StatusBar.SimpleText:=oisAll;
|
||||||
|
|
||||||
@ -3817,14 +3814,15 @@ begin
|
|||||||
if Issues = nil then Exit;
|
if Issues = nil then Exit;
|
||||||
|
|
||||||
X := 0;
|
X := 0;
|
||||||
Y := (WidgetSetsIssuesBox.Height - WidgetSetImageList.Height) div 2;
|
Y := (WidgetSetsIssuesBox.Height - IDEImages.Images_16.Height) div 2;
|
||||||
None := True;
|
None := True;
|
||||||
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do
|
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do
|
||||||
begin
|
begin
|
||||||
if Issues.WidgetSetIssues[Platform] > 0 then
|
if Issues.WidgetSetIssues[Platform] > 0 then
|
||||||
begin
|
begin
|
||||||
None := False;
|
None := False;
|
||||||
WidgetSetImageList.Draw(WidgetSetsIssuesBox.Canvas, X, Y, Integer(Platform));
|
IDEImages.Images_16.Draw(WidgetSetsIssuesBox.Canvas, X, Y,
|
||||||
|
IDEImages.LoadImage(16, WidgetSetImageNames[Platform]));
|
||||||
Inc(X, 16);
|
Inc(X, 16);
|
||||||
|
|
||||||
S := WidgetSetsIssuesBox.Canvas.TextExtent(IntToStr(Issues.WidgetSetIssues[Platform]));
|
S := WidgetSetsIssuesBox.Canvas.TextExtent(IntToStr(Issues.WidgetSetIssues[Platform]));
|
||||||
@ -3868,14 +3866,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
X := 0;
|
X := 0;
|
||||||
Y := (ComponentIssuesBox.Height - WidgetSetImageList.Height) div 2;
|
Y := (ComponentIssuesBox.Height - IDEImages.Images_16.Height) div 2;
|
||||||
None := True;
|
None := True;
|
||||||
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do
|
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do
|
||||||
begin
|
begin
|
||||||
if WidgetSetIssues[Platform] > 0 then
|
if WidgetSetIssues[Platform] > 0 then
|
||||||
begin
|
begin
|
||||||
None := False;
|
None := False;
|
||||||
WidgetSetImageList.Draw(ComponentIssuesBox.Canvas, X, Y, Integer(Platform));
|
IDEImages.Images_16.Draw(WidgetSetsIssuesBox.Canvas, X, Y,
|
||||||
|
IDEImages.LoadImage(16, WidgetSetImageNames[Platform]));
|
||||||
Inc(X, 16);
|
Inc(X, 16);
|
||||||
|
|
||||||
S := ComponentIssuesBox.Canvas.TextExtent(IntToStr(WidgetSetIssues[Platform]));
|
S := ComponentIssuesBox.Canvas.TextExtent(IntToStr(WidgetSetIssues[Platform]));
|
||||||
@ -4773,9 +4772,8 @@ end;
|
|||||||
initialization
|
initialization
|
||||||
{$I objectinspector.lrs}
|
{$I objectinspector.lrs}
|
||||||
|
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user