mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-13 12:29:29 +02:00
ide: fix component treeview images
git-svn-id: trunk@22914 -
This commit is contained in:
parent
2df5004aed
commit
9618584757
@ -45,7 +45,7 @@ type
|
||||
procedure SetSelection(const NewSelection: TPersistentSelectionList);
|
||||
protected
|
||||
procedure DoSelectionChanged; override;
|
||||
function GetImageFor(AComponent: TComponent):integer;
|
||||
function GetImageFor(APersistent: TPersistent):integer;
|
||||
procedure DragOver(Source: TObject; X,Y: Integer; State: TDragState;
|
||||
var Accept: Boolean); override;
|
||||
procedure DragCanceled; override;
|
||||
@ -187,7 +187,7 @@ var
|
||||
begin
|
||||
CollectionNode := FTreeView.Items.AddChild(FNode, AName);
|
||||
CollectionNode.Data := ACollection;
|
||||
CollectionNode.ImageIndex := 4;
|
||||
CollectionNode.ImageIndex := FTreeView.GetImageFor(ACollection);
|
||||
CollectionNode.SelectedIndex := CollectionNode.ImageIndex;
|
||||
CollectionNode.MultiSelected := FTreeView.Selection.IndexOf(ACollection) >= 0;
|
||||
|
||||
@ -196,7 +196,7 @@ begin
|
||||
Item := ACollection.Items[i];
|
||||
ItemNode := FTreeView.Items.AddChild(CollectionNode, Format('%d - %s', [i, Item.ClassName]));
|
||||
ItemNode.Data := Item;
|
||||
ItemNode.ImageIndex := 5;
|
||||
ItemNode.ImageIndex := FTreeView.GetImageFor(Item);
|
||||
ItemNode.SelectedIndex := ItemNode.ImageIndex;
|
||||
ItemNode.MultiSelected := FTreeView.Selection.IndexOf(Item) >= 0;
|
||||
end;
|
||||
@ -420,17 +420,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TComponentTreeView.GetImageFor(AComponent: TComponent): integer;
|
||||
function TComponentTreeView.GetImageFor(APersistent: TPersistent): integer;
|
||||
begin
|
||||
if Assigned(AComponent) then
|
||||
if Assigned(APersistent) then
|
||||
begin
|
||||
if (AComponent is TControl) and (csAcceptsControls in TControl(AComponent).ControlStyle) then
|
||||
if (APersistent is TControl) and (csAcceptsControls in TControl(APersistent).ControlStyle) then
|
||||
Result := 3
|
||||
else
|
||||
if (AComponent is TControl) then
|
||||
if (APersistent is TControl) then
|
||||
Result := 2
|
||||
else
|
||||
Result := 1;
|
||||
if (APersistent is TComponent) then
|
||||
Result := 1
|
||||
else
|
||||
if (APersistent is TCollection) then
|
||||
Result := 4
|
||||
else
|
||||
if (APersistent is TCollectionItem) then
|
||||
Result := 5;
|
||||
end
|
||||
else
|
||||
Result := -1;
|
||||
|
@ -33,18 +33,18 @@ LazarusResources.Add('oi_comp','PNG',[
|
||||
+#145'k'#242#214'H'#193'.'#176'c'#203'vLi!'#12#1#128'F'#226#236#26#194#28#24
|
||||
+'$i'#181#178'e'#129' C'#167#172'##'#29#138'='#3#251#248#203'm'#145'hE$M:'#23
|
||||
+#206#3#2#157#166#160#20'Z'#235#236'2@'#236'u'#240'T'#164'?sv'#221'=q'#250'lA'
|
||||
+#26#194#160#152'/Q'#237#31'b'#239#224'>'#26'c'#187#185'f'#196#172#206'|J0'
|
||||
+#21#211')`'#152'6q'#24#226#174#173#178'P'#220#192#217#7#158#17#241'@'#237#162
|
||||
+#27#234#134#20'B'#146'$q'#246#255#156#149#163'48'#200''''#7'J'#188#191#253' '
|
||||
+#215'C'#151'[_L'#227'u[4M8Wy'#140'sC'#227'l'#172#214'('#228'-'#154']s'#196
|
||||
+#148#169#208'+'#221'?'#133#210#10#165#18'B'#21'g'#249'_'#17'}'#236'='#250#6
|
||||
+#23#230'o'#208'l'#133'T+}'#20#1#174#175#240#211#226'M'#130'0'#198#176#243'B'
|
||||
+#230#218#197'G'#166'g?_'#190'4'#137#182#191#134'%-L'#195'FJA)'#159#163#186
|
||||
+'c+'#15#213#182#210'j{,'#253#222#198#11#227'lY'#154#6'R'#130'y'#250#165'3'
|
||||
+#151#131' '#232#159'x'#247#196#225'o:sg'#172#178',j'#157'"'#144'$*%R)N'#222
|
||||
+'b'#219#150'2'#151#191'kb'#10#177#158#20'i'#10#255'*'#211#139'o'#29#219#140
|
||||
+#192']n?'#234'='#254#240'N'#161#17#164'J'#17#196')'#179'?'#254#129'e'#25'h'
|
||||
+#157#210's#|'#215#211'wl'#227#209#201'w'#14#244#180#243#145#178'7'#221'3\'
|
||||
+#26#194#160#152'/Q'#237#31'b'#239#224'>'#26'c'#187#185'f'#196#172#206'|J0'
|
||||
+#127#21#211')`'#152'6q'#24#226#174#173#178'P'#220#192#217#7#158#17#241'@'#237
|
||||
+#162#27#234#134#20'B'#146'$q'#246#255#156#149#163'48'#200''''#7'J'#188#191
|
||||
+#253' '#215'C'#151'[_L'#227'u[4M8Wy'#140'sC'#227'l'#172#214'('#228'-'#154']s'
|
||||
+#196#148#169#208'+'#221'?'#133#210#10#165#18'B'#21'g'#249'_'#17'}'#236'='#250
|
||||
+#6#23#230'o'#208'l'#133'T+}'#20#1#174#175#240#211#226'M'#130'0'#198#176#243
|
||||
+'B'#230#218#197'G'#166'g?_'#190'4'#127#137#182#191#134'%-L'#195'FJA)'#159#163
|
||||
+#186'c+'#15#213#182#210'j{,'#253#222#198#11#227'lY'#154#6'R'#130'y'#250#165
|
||||
+'3'#151#131' '#232#159'x'#247#196#225'o:sg'#172#178',j'#157'"'#144'$*%R)N'
|
||||
+#222'b'#219#150'2'#151#191'kb'#10#177#158#20'i'#10#255'*'#211#139'o'#29#219
|
||||
+#140#192']n?'#234'='#254#240'N'#161#17#164'J'#17#196')'#179'?'#254#129'e'#25
|
||||
+'h'#157#210's#|'#215#211'wl'#227#209#201'w'#14#244#180#243#145#178'7'#221'3\'
|
||||
+#237#163#228#216#204'-'#172#224#135#17#221#182#135#147#182'W'#139'"'#24#207
|
||||
+'2'#190#147'|'#223#23#207'O'#190'w'#228#169#137')'#247#201#215#207#235#177
|
||||
+#147#31#235''''#234'S'#222#161'W'#222'~y'#221#243'7\dh'#252#142#16#161'x'#0#0
|
||||
@ -66,10 +66,10 @@ LazarusResources.Add('oi_control','PNG',[
|
||||
+#7#223#167#6#169#31'9'#186#6#2#255'%Pr'#202'PW'#226#229#202'M'#128#5#215#0
|
||||
+#171#9'B='#20#243#209'(A='#181#4'#n'#2#172'$p'#24#251'/'#193#147#241'\'#255
|
||||
+#249'J'#231#212#239#176#3#215'@pT'#195'T'#140#132'/`m'#231#18'ji'#180'_'#135
|
||||
+'`['#23#245#11'D M'#167#243#31#250#7#137'oY'#5'2'#240':L'#172#26#248'V'#238
|
||||
+#238#29#222'jC'#200'9='#13'WDI'#198#136#180'Dj'#177'xe'#177'T'#13#1'F'#6'>'
|
||||
+#253'N'#142#199'?7'#188#206'o'#161#243#174#205#182#241#161's'#0#0#0#0'IEND'
|
||||
+#174'B`'#130
|
||||
+'`['#23#245#11'D M'#167#243#31#250#7#137'oY'#5'2'#240':L'#172#26#248'V'#127
|
||||
+#238#238#29#222'jC'#200'9='#13'WDI'#198#136#180'Dj'#177'xe'#177'T'#13#1'F'#6
|
||||
+'>'#253'N'#142#199'?7'#188#206'o'#161#243#174#205#182#241#161's'#0#0#0#0'IEN'
|
||||
+'D'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('oi_form','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a'
|
||||
@ -85,36 +85,43 @@ LazarusResources.Add('oi_form','PNG',[
|
||||
+#209#13#198#150#207'P0'#183#253#0'a'#157'1'#148'('#18#213#200#172#170'F'#22
|
||||
+#242#189#130#178#209#165'S'#20'$'#182'r'#186#1'E'#137'fU5'#178#244#177#144
|
||||
+#238#140','#158#160' '#190'y'#143#13'8'#215'l'#144'('#18#135'64'#26'J'#30#163
|
||||
+'`z'#227'N7`H-q~'#31'K5rg q'#136#130#169#244'-'#134'%'#141'2'#197#154#146
|
||||
+#244#199#15'P0'#153#186#249#215''#16#157#205'j'#129#14'=P'#11'|'#233#253#203
|
||||
+#171#220'['#160#139#187#11#195#184#193'\rIJ'#129#176'D'#238'b1'#181'X2'#147
|
||||
+#151#209#215#217'~'#29#27#142't7'#189#206#223'{'#156#170#227#249':'#145#136#0
|
||||
+#0#0#0'IEND'#174'B`'#130
|
||||
+'`z'#227'N7`H-q~'#31'K5rg q'#136#130#169#244'-'#134#127'%'#141'2'#197#154#146
|
||||
+#244#199#15'P0'#153#186#249#215#127#16#157#205'j'#129#14'=P'#11'|'#233#253
|
||||
+#203#171#220'['#160#139#187#11#195#184#193'\rIJ'#129#176'D'#238'b1'#181'X2'
|
||||
+#147#151#209#215#217'~'#29#27#142't7'#189#206#223'{'#156#170#227#249':'#145
|
||||
+#136#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('oi_collection','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#4#0#0#0#181#250'7'
|
||||
+#234#0#0#0#4'gAMA'#0#0#175#200'7'#5#138#233#0#0#0#25'tEXtSoftware'#0'Adobe I'
|
||||
+'mageReadyq'#201'e<'#0#0#0#207'IDAT('#207'u'#145'M'#10#194'0'#16'FG='#135'R'
|
||||
+#207'P'#218#30#195'3'#184#243':E'#23#30#193'#'#184'q'#163#208#222#192'C("'
|
||||
+#180#218#159#180#240'9'#153#180'i'#10#149#15#134#132'y'#188'0'#25#162#21#5#20
|
||||
+#218'x4'#7#185'!'#10'T'#221'B'#167'A'#137'}LkZ'#140#129#176#229#198#29#23#156
|
||||
+#145#226#138#221#137'6'#174'G'#128#10'7(L{'#4'P'#12#252#243#8#208' '#193#216
|
||||
+#163'o'#135'X#'#29#144'b'#240#228'x'#227#193#167#2'G'#141#12'@'#239')'#144
|
||||
+#225#217'yxp'#23'0'#181#194#151#145#151'X,'#144'X'#192' '#133'<4i0H'#205#200
|
||||
+#167#3'<.'#17'm{'#143#137'b'#164'4'#0'O:'#227'a"'#215#160#207'JF'#22'@'#254
|
||||
+#203'zt'#179#143#3#12#30'7uN'#254'x'#181#158#179'x'#29#159#150'?,?X'#234#201
|
||||
+'.Yw'#0#0#0#0'IEND'#174'B`'#130
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a'
|
||||
+#0#0#1'QIDATx^'#149#144'1K'#195'P'#16#199#255'/'#13#201'X'#200'P7'#233#236
|
||||
+#146#201#228'K'#248')B'#135#14'I'#190#134'c'#197#169'Cp'#140#248'!2'#20'\$K]'
|
||||
+#179'D]'#130#29#10#1#167#180'1'#222#129'7<}'#161'z'#240#231#142#199#221#255
|
||||
+#253#238#20#128's'#210#25'I'#225'w'#236'Ho'#195'0|b$x'#232#178#235#186'G'#203
|
||||
+#178#28'y'#164#1#28#143'GdYv'#155'$'#201#205#183'I?f'#16'P'#243#211#225'p@]'
|
||||
+#215'h'#154#6'\O'#167'S'#206#200#243#252'a'#189'^'#223#3'x'#22#26#163#1#9'eY'
|
||||
+'"'#12'C'#16#13#254'J#'#157'<$'#153#9'PU'#21'6'#155#13#138#162#192'v'#187#133
|
||||
+#239#251#233'r'#185#188#6'p'#165#148#154#147','#141#128#127'b'#130' '#8'`'
|
||||
+#162#17#9'M'#28#199'+'#166#177#181'}'#148'2'#210#240#16#139'k'#207#243#16'EQ'
|
||||
+'j'#219'6'#136'h%'#246#248'i4'#153'L'#180#154'%'#31'8'#142#131#197'b'#145#2
|
||||
+#152'i'#6'&'#26#30'd'#18#206#174#235#162'm['#236#247'{H'#200#10'r'#241#147'4'
|
||||
+',^G'#194't'#131'Q'#19#161#146','#6';:H'#200#239#164#11'r'#191'3'#208#240#144
|
||||
+#24#233#6#212#248'B'#15#175#220'c'#164'1'#223'E_a'#160#224'D'#13#239'''h'#196
|
||||
+#196'|'#131#255#208#244'}'#255#193'I'#137#187#1'w'#14'`'#134#241#232'I'#187
|
||||
+'/7Z'#188'~F'#2'd'#254#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('oi_item','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#4#0#0#0#181#250'7'
|
||||
+#234#0#0#0#4'gAMA'#0#0#175#200'7'#5#138#233#0#0#0#25'tEXtSoftware'#0'Adobe I'
|
||||
+'mageReadyq'#201'e<'#0#0#0#184'IDAT('#207'u'#145'['#14#194' '#16'E'#167#174
|
||||
+#195'&'#238#129#134'}'#154#232#135#27#212#248#138#181'O('#212#235'@_'#214#150
|
||||
+#156#225#135'9a.'#25#2#209#150#4#201'?v'#180#1'9\'#9#149#154#214'bB'#225#176
|
||||
+#31#20'W'#210#180#5'J'#207#27'/\Y'#185#224#216'+D'#17'I'#139#26#154'O'#141#28
|
||||
+')n,T(pbe'#20#180#167#230'F'#134#251'8'#138#179'D'#189'`'#252#133#225#233'n'
|
||||
+#204#131'_9'#207#133#129'N'#201'8'#201's]'#232#148#138#179'd!'#193#162#225'4'
|
||||
+#21#19#20#140#15#172#214#4#227'i'#24#21#22#154#145#192'/&~'#133#207'<EOK'#178
|
||||
+#219'E'#162'K'#219'.'#219':'''#209#9'1%'#139'u;'#4#197#160'/2'#165'['#240#174
|
||||
+'y'#182'O'#0#0#0#0'IEND'#174'B`'#130
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a'
|
||||
+#0#0#1'!IDATx^'#141#145'Aj'#134'0'#16#133''''#249'E'#221#20'w'#237#166#148
|
||||
+#222#161#7#232'!<'#128#11#247'B'#143'R'#208#133#215#235#174#130'"'#136#173
|
||||
+#162#137#157#23#254#192' %'#248#224#145'L'#146#247'9'#140#234'8'#14'RJ='#19
|
||||
+#209#19#251'Fau'#236'/'#206'X'#242#2#128#245#182','#203#184'm'#155#217#247
|
||||
+#253#248#207'|'#127#212'u'#253#201#145'W'#182'F'#14#214'w'#206#141#245#176
|
||||
+#174#171'f'#147#247'<'#207'4M'#19#245'}OQ'#20'Q'#158#231'U'#211'4'#31#28'x'
|
||||
+#225#174']V+'#22'68`'#136'{'#168#181#246#198#185'3'#148'e'#25#21'EQ'#181'm'
|
||||
+#235' '#14'@B'#8#200#21'@'#15#129#226'8'#166'4M'#169','#203#138#203'G'#197':'
|
||||
+#3'\Hv'#130#26#193'q'#28'i'#24#6#234#186#142#164'"Y0P'#238']X'#214#198#24#0
|
||||
+'O'#128#128#4#196#207#2#147#191#6#144#16'9'#135#179'4'#150#11#16'9'#212'k'#29
|
||||
+#160'U'#185#7#196'Z'#139'2'#0#8#131#240#245#235#0'?0'#172'BA'#0'z'#150#175'C'
|
||||
+'a'#235#2','#205'F'#208#26'c~'#253'EX'#238#237#15#175'Fv'#240#157'$'#201#251
|
||||
+#213#191'r'#15'w('#254#0#160'3'#141':'#248'q[U'#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 394 B |
Binary file not shown.
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 346 B |
Loading…
Reference in New Issue
Block a user