Forum > Editor

menue - ident icons

(1/2) > >>

Please check the screenshot.
I have 2 icons looking the same.

In English they mean "complete source code" and "copy source block".
What can I do to distinguish them?

At a guess: Default-Icon for entries not having an individual Icon.
Haven't found an option to assign an icon to a menu


I have two icons with flashes side by side.
IMHO they SHOULD have an individual icon.

The menu items are created in unit mainbase in the ide folder of your Lazarus installation, the "Source" menu in TMainIDEBase.SetupSourceMenu:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TMainIDEBase.SetupSourceMenu;var  ParentMI, SubParentMI: TIDEMenuSection;begin  with MainIDEBar do begin    CreateMenuSeparatorSection(mnuSource,itmSourceBlockActions,'itmSourceBlockActions');    ParentMI:=itmSourceBlockActions;    CreateMenuItem(ParentMI,itmSourceCommentBlock,'itmSourceCommentBlock',lisMenuCommentSelection, 'menu_comment');    ...    CreateMenuItem(ParentMI,itmSourceCompleteCodeInteractive,'itmSourceCompleteCodeInteractive',lisMenuCompleteCodeInteractive);    ...    The first CreateMenuItem call has as last parameter the name of the icon, here: "menu_comment". The second does not. Therefore, it gets the default icon.

All you have to do is to go to folder images/menu, find the icon that you would like to have for the "Complete code" item, add its name (without ".png") to the corresponding CreateMenuItem call, and rebuild the IDE.

Thank you!
I will keep your post in my tricks-folder.

Double post, because I thought, this may be a new feature wish, if it would not have been possible (as Zvoni thought and me too)


[0] Message Index

[#] Next page

Go to full version