Recent

Author Topic: menue - ident icons  (Read 1181 times)

Nicole

  • Hero Member
  • *****
  • Posts: 970
menue - ident icons
« on: November 29, 2022, 01:10:57 pm »
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?

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: menue - ident icons
« Reply #1 on: November 29, 2022, 01:17:16 pm »
At a guess: Default-Icon for entries not having an individual Icon.
Haven't found an option to assign an icon to a menu
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: menue - ident icons
« Reply #2 on: November 29, 2022, 04:30:48 pm »
 :'(

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

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: menue - ident icons
« Reply #3 on: November 29, 2022, 05:09:32 pm »
The menu items are created in unit mainbase in the ide folder of your Lazarus installation, the "Source" menu in TMainIDEBase.SetupSourceMenu:

Code: Pascal  [Select][+][-]
  1. procedure TMainIDEBase.SetupSourceMenu;
  2. var
  3.   ParentMI, SubParentMI: TIDEMenuSection;
  4. begin
  5.   with MainIDEBar do begin
  6.     CreateMenuSeparatorSection(mnuSource,itmSourceBlockActions,'itmSourceBlockActions');
  7.     ParentMI:=itmSourceBlockActions;
  8.     CreateMenuItem(ParentMI,itmSourceCommentBlock,'itmSourceCommentBlock',lisMenuCommentSelection, 'menu_comment');
  9.     ...
  10.     CreateMenuItem(ParentMI,itmSourceCompleteCodeInteractive,'itmSourceCompleteCodeInteractive',lisMenuCompleteCodeInteractive);
  11.     ...    
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.

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: menue - ident icons
« Reply #4 on: November 29, 2022, 06:01:34 pm »
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)

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: menue - ident icons
« Reply #5 on: November 29, 2022, 06:21:53 pm »
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)
New feature wish for customizable icons? I think this is not easy, and has little benefit. Better: If you miss an icon propose which one among the huge icon collection that we have in the images folder should be used (it must be unique, of course, and should "fit" somehow to the others logically), or describe or sketch how it should be modified, and submit it as a feature request to bug tracker.

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: menue - ident icons
« Reply #6 on: December 06, 2022, 12:06:31 pm »
thank you!

 

TinyPortal © 2005-2018