xdev-software / intellij-plugin-openrewriter

An IntelliJ plugin that provides support for OpenRewrite
https://plugins.jetbrains.com/plugin/23896
Apache License 2.0
2 stars 0 forks source link

Huge icon in Switcher and Recent Files #19

Closed rweisleder closed 2 months ago

rweisleder commented 3 months ago

When opening the "Switcher" (Ctrl + Tab) or "Recent Files" (Ctrl + E), the plugin icon is really huge. It should have the same size as the other icons.

image

AB-xdev commented 2 months ago

Thank you for the issue

I tried to reproduce it, but was unable to do so: g g

I'm using

What IDE (+version) are you using and what OS? Do you have any special display settings? (e.g. 4k display with 200% scaling set inside the OS)

rweisleder commented 2 months ago

Nothing special so far:

AB-xdev commented 2 months ago

Retested again and it seems to be only a problem when using the "New UI" with the "old" UI everything works fine.

AB-xdev commented 2 months ago

The problem is not present on IDEA 2023.2 with the new UI, so there must have been a change in newer versions of IDEA...

AB-xdev commented 2 months ago

There seems to be a problem inside: https://github.com/JetBrains/intellij-community/blob/def6433a5dd9f0a984cbc6e2835d27c97f2cb5f0/platform/platform-impl/src/com/intellij/ide/actions/SwitcherRendering.kt#L113-L119

AB-xdev commented 2 months ago

The only difference between 2023.2 and 2024-EAP seems to be that in 2023.2 window.icon is a ToolWindowIcon while in 2024-EAP it's a CachedImageIcon, which seems to result in the different scaling.

AB-xdev commented 2 months ago

Reported to JetBrains via https://youtrack.jetbrains.com/issue/IDEA-354465

rweisleder commented 2 months ago

Thanks for analyzing and reporting!

AB-xdev commented 2 months ago

As a workaround I set the (default) width and height of the pluginIcon to 16px, this should workaround the bug until a fix is provided.

AB-xdev commented 2 months ago

Closed here and handed over to https://github.com/xdev-software/intellij-plugin-template/issues/26 for further tracking.