How to restore an icon in a toolbar?

Hi!

Some long time ago I've changed (do not remember why) one of my icons to something non-standard. Now I am trying to restore the original icon but no success.
There is the "Edit Icon" button but it requires an icon file which I do not have, I am trying to restore the icon to the original, there should be some way to restore it without providing a file... Btw I am pretty sure that back when I changed it - I picked the icon from some kind of built-in icons list.

Also I've tried to use "Restore All Defaults" button but it does not seem to change the icon.

Thanks!

0
5 comments

Hi there,

I may suggest checking the config files where all menu customisation is stored.

Check a file called customization.xml (while IDE is closed; I guess you would need to delete some attribute for that action there). Latest v2012.1 on Windows should have it stored in C:\Users\USERNAME\AppData\Roaming\JetBrains\PhpStorm2020.1\options folder.

For other OS/older versions please check https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs and/or https://www.jetbrains.com/help/phpstorm/tuning-the-ide.html#config-directory

P.S. If you installed your IDE using JetBrains Toolbox App, then the path might be different, try using the cog icon next to the app for an option that will open config folder. (You can also check the path in idea.log file -- "Help | Show Log in ...")

0
Avatar
Permanently deleted user

Hey Andriy!

Yeah, I saw that file but there is not much push-related in there:

<application>
<component name="com.intellij.ide.ui.customization.CustomActionsSchema">
...
<group value="Vcs.Push" is_action="true" action_type="1" position="6">
<path value="root" />
<path value="Main Toolbar" />
<option name="myInitialPosition" value="-1" />
</group>
<group value="Vcs.ShowTabbedFileHistory" is_action="true" action_type="1" position="7">
<path value="root" />
<path value="Main Toolbar" />
<option name="myInitialPosition" value="-1" />
</group>
<action id="Vcs.Push" />
...
</component>
</application>
0

The only other options I may think of right now:

1. Try to backup and delete that file (while IDE is closed of course) -- any difference?

2. Just in case if some plugin affects this: try disabling all custom (non bundled by default) plugins

P.S. I assume that this file is from the right config folder. I mean -- I do not know if this file is getting synced when you use one of the Sync Settings plugins (I do not use them); when they are used the actual settings file path is a bit different (should be a subfolder). Just in case: search and check other files with such name.

Hopefully JetBrains Support can help here if none of the aforementioned stuff do any good.

0

OK, I've messed around with my setup (backups and stuff) and was unable to reproduce the issue by editing the menu: for the action with default icon, I have set up custom icon first, restarted IDE -- all good, new icon remembered; then clicked to edit that icon and deleted the path (so it's empty); restarted again .. and it has default icon back.

But then I looked at your file ...  went and edited the config file directly .. and was able to obtain the same behavior.

Basically, you need to completely delete an entry from customisation.xml file that corresponds to that action. Not super sure which one that would be (as I did my tests on "File | Synchronize" action) but I think it should be the one below:

<action id="Vcs.Push" />

 

0
Avatar
Permanently deleted user

This actually helped, wow! I deleted the file and it reset the toolbar including icons, what a miracle :)
Thank you Andriy, I come here once a couple years probably and you are always here to help :D

0

Please sign in to leave a comment.