mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:39:29 +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
|
||||
Classes, SysUtils, InterfaceBase, LCLProc, LResources, Contnrs, Forms, Controls, Graphics,
|
||||
Dialogs, StdCtrls, ComCtrls, CompatibilityIssues, IDEOptionDefs, LazarusIDEStrConsts,
|
||||
EnvironmentOpts, Masks, ComponentReg, ObjectInspector, ExtCtrls, Buttons, LazConf;
|
||||
IDEImagesIntf, EnvironmentOpts, Masks, ComponentReg, ObjectInspector, ExtCtrls, Buttons,
|
||||
LazConf;
|
||||
|
||||
type
|
||||
{ TIssueBrowserView }
|
||||
@ -76,7 +77,7 @@ begin
|
||||
|
||||
IssueFilterGroupBox.Caption := lisFilterIssues;
|
||||
NameLabel.Caption := lisCodeToolsDefsName;
|
||||
IssueTreeView.Images := WidgetSetImageList;
|
||||
IssueTreeView.Images := IDEImages.Images_16;
|
||||
|
||||
X := 10;
|
||||
// create widget set filter buttons
|
||||
@ -93,7 +94,7 @@ begin
|
||||
Down := True;
|
||||
AllowAllUp := True;
|
||||
|
||||
WidgetSetImageList.GetBitmap(Integer(P), Glyph);
|
||||
IDEImages.Images_16.GetBitmap(IDEImages.LoadImage(16, WidgetSetImageNames[P]), Glyph);
|
||||
ShowHint := True;
|
||||
Hint := LCLPlatformDisplayNames[P];
|
||||
OnClick := @NameFilterEditChange;
|
||||
@ -136,7 +137,7 @@ var
|
||||
IssueProperty: String;
|
||||
IssueMask: TMaskList;
|
||||
S, M: String;
|
||||
I: PtrInt;
|
||||
I, ID: PtrInt;
|
||||
Issues: TStringList;
|
||||
Issue: TIssue;
|
||||
C: TClass;
|
||||
@ -233,10 +234,13 @@ begin
|
||||
begin
|
||||
with IssueTreeView.Items.AddChild(nil, Issues[I]) do
|
||||
begin
|
||||
ImageIndex := Integer(FIssueList[Integer(Issues.Objects[I])].WidgetSet);
|
||||
ID := Integer(Issues.Objects[I]);
|
||||
|
||||
ImageIndex := IDEImages.LoadImage(16, WidgetSetImageNames[FIssueList[ID].WidgetSet]);
|
||||
StateIndex := ImageIndex;
|
||||
SelectedIndex := ImageIndex;
|
||||
Data := @FIssueList[Integer(Issues.Objects[I])];
|
||||
|
||||
Data := @FIssueList[ID];
|
||||
end;
|
||||
if NameFilterEdit.Text = Issues[I] then
|
||||
begin
|
||||
|
@ -11,6 +11,7 @@ object ObjectInspectorDlg: TObjectInspectorDlg
|
||||
KeyPreview = True
|
||||
OnResize = ObjectInspectorResize
|
||||
PopupMenu = MainPopupMenu
|
||||
LCLVersion = '0.9.25'
|
||||
object StatusBar: TStatusBar
|
||||
Height = 20
|
||||
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'
|
||||
+'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'
|
||||
+'nspectorResize'#9'PopupMenu'#7#13'MainPopupMenu'#0#10'TStatusBar'#9'StatusB'
|
||||
+'ar'#6'Height'#2#20#3'Top'#3#137#2#5'Width'#3#19#1#6'Panels'#14#1#5'Width'#2
|
||||
+'d'#0#1#5'Width'#2'2'#0#0#11'SimplePanel'#8#0#0#9'TComboBox'#23'AvailPersist'
|
||||
+'entComboBox'#6'Height'#2#21#5'Width'#3#19#1#5'Align'#7#5'alTop'#16'AutoComp'
|
||||
+'leteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#10'ItemH'
|
||||
+'eight'#2#13#9'OnCloseUp'#7#20'AvailComboBoxCloseUp'#8'TabOrder'#2#0#0#0#10
|
||||
+'TPopupMenu'#13'MainPopupMenu'#7'OnPopup'#7#20'OnMainPopupMenuPopup'#4'left'
|
||||
+#2#9#3'top'#2#11#0#0#0
|
||||
+'nspectorResize'#9'PopupMenu'#7#13'MainPopupMenu'#10'LCLVersion'#6#6'0.9.25'
|
||||
+#0#10'TStatusBar'#9'StatusBar'#6'Height'#2#20#3'Top'#3#137#2#5'Width'#3#19#1
|
||||
+#6'Panels'#14#1#5'Width'#2'd'#0#1#5'Width'#2'2'#0#0#11'SimplePanel'#8#0#0#9
|
||||
+'TComboBox'#23'AvailPersistentComboBox'#6'Height'#2#21#5'Width'#3#19#1#5'Ali'
|
||||
+'gn'#7#5'alTop'#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactS'
|
||||
+'earchAscending'#0#10'ItemHeight'#2#13#9'OnCloseUp'#7#20'AvailComboBoxCloseU'
|
||||
+'p'#8'TabOrder'#2#0#0#0#10'TPopupMenu'#13'MainPopupMenu'#7'OnPopup'#7#20'OnM'
|
||||
+'ainPopupMenuPopup'#4'left'#2#9#3'top'#2#11#0#0#0
|
||||
]);
|
||||
|
@ -734,8 +734,18 @@ const
|
||||
|
||||
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
|
||||
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;
|
||||
Font:=FNameFont;
|
||||
Font.Color := clRed;
|
||||
@ -2249,8 +2259,8 @@ begin
|
||||
begin
|
||||
if Platform in CurRow.FWidgetSets then
|
||||
begin
|
||||
Dec(X, WidgetSetImageList.Width);
|
||||
WidgetSetImageList.Draw(Canvas, X, Y, Integer(Platform));
|
||||
Dec(X, IDEImages.Images_16.Width);
|
||||
IDEImages.Images_16.Draw(Canvas, X, Y, IDEImages.LoadImage(16, WidgetSetImageNames[Platform]));
|
||||
end;
|
||||
end;
|
||||
Font:=OldFont;
|
||||
@ -3192,19 +3202,6 @@ begin
|
||||
FShowComponentTree:=true;
|
||||
FShowFavorites := 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;
|
||||
StatusBar.SimpleText:=oisAll;
|
||||
@ -3817,14 +3814,15 @@ begin
|
||||
if Issues = nil then Exit;
|
||||
|
||||
X := 0;
|
||||
Y := (WidgetSetsIssuesBox.Height - WidgetSetImageList.Height) div 2;
|
||||
Y := (WidgetSetsIssuesBox.Height - IDEImages.Images_16.Height) div 2;
|
||||
None := True;
|
||||
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do
|
||||
begin
|
||||
if Issues.WidgetSetIssues[Platform] > 0 then
|
||||
begin
|
||||
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);
|
||||
|
||||
S := WidgetSetsIssuesBox.Canvas.TextExtent(IntToStr(Issues.WidgetSetIssues[Platform]));
|
||||
@ -3868,14 +3866,15 @@ begin
|
||||
end;
|
||||
|
||||
X := 0;
|
||||
Y := (ComponentIssuesBox.Height - WidgetSetImageList.Height) div 2;
|
||||
Y := (ComponentIssuesBox.Height - IDEImages.Images_16.Height) div 2;
|
||||
None := True;
|
||||
for Platform := Low(TLCLPlatform) to High(TLCLPlatform) do
|
||||
begin
|
||||
if WidgetSetIssues[Platform] > 0 then
|
||||
begin
|
||||
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);
|
||||
|
||||
S := ComponentIssuesBox.Canvas.TextExtent(IntToStr(WidgetSetIssues[Platform]));
|
||||
@ -4773,9 +4772,8 @@ end;
|
||||
initialization
|
||||
{$I objectinspector.lrs}
|
||||
|
||||
|
||||
finalization
|
||||
|
||||
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user