buchizo / ClaudiaIDE

This extension can change easily the background image of editor window in Visual Studio.
https://marketplace.visualstudio.com/items?itemName=kbuchi.ClaudiaIDE
641 stars 112 forks source link

Transparent background behavior breaks several plug-in/extension windows #78

Closed kookyabird closed 3 years ago

kookyabird commented 3 years ago

As I understand it the injection of transparency for backgrounds in editors was introduced to address a specific issue, but it has introduced another one. Various editor based windows for other extensions, one being ReSharper, are unusable with a dark theme because the text is too light to be shown on the window background color with the editor being transparent.

An example: The refactoring window in ReSharper has a preset light background. The preview/editing control is an editor which normally has my dark background and light text. ClaudiaIDE attaches itself to the editor control to display my image. When it makes the background transparent, the preset light background of the refactoring window makes it impossible to read the light text.

This occurs in numerous places in ReSharper, and any other extension that uses a non-theme controllable light window background.

I believe a suitable short-term fix would be to add a configuration option to disable the transparency for people like myself who won't encounter the flicker issue, but do encounter this light on light text issue.

buchizo commented 3 years ago

@kookyabird Hi, are you talking about transparent image with alpha channel? or ClaudiaIDE's settings? If possible could you provide some case like as screen shots or sample image?

kookyabird commented 3 years ago

The image I'm using is a non-transparent PNG. The issue occurs regardless of the opacity or edge fade settings I use. The transparency I was referring to is what you mentioned in this issue here: https://github.com/buchizo/ClaudiaIDE/issues/60#issuecomment-516178890 This behavior you mention has a negative outcome when you have a dark background light text based theme and the window background color for some "editors" is not also dark.

Here are the two example areas without the extension running so that you can see the theming. Text Editor - ClaudiaIDE Disabled

ReSharper Editor Sample - ClaudiaIDE Disabled

Here are the same areas with the extension running, and no opacity or edge fade settings enabled. Note that the background of the plain text editor has changed to reveal the environment window color as you described in the linked issue comment. The same thing occurs in the ReSharper Options window, wherein the window color is not controllable by the user at all. Text Editor - Opacity and Fade

ReSharper Editor Sample - Opacity and Fade

Lastly we have the same areas with my normal settings for opacity and edge fading. Basically the same as the previous, except now I can't even read the text over top of the image because it's 10% opacity, and it's practically the background color.

Text Editor - No Opacity or Face

ReSharper Editor Sample - No Opacity or Fade

This behavior is also seen in the refactoring preview and code generation previews. I don't have it installed anymore, but I had similar behavior in another extension that provided some code stubbing functionality that employed a non-themed window, but used a Visual Studio Editor control for the main work area.

buchizo commented 3 years ago

@kookyabird Thank you for your information. I'll think about solves solution for this issue. Maybe I add option that background image limit to main editor window only, if possible.

buchizo commented 3 years ago
buchizo commented 3 years ago

I guess this new option is work fine about this issue.

buchizo commented 3 years ago

@kookyabird would you try this Background image limit to only editor window option after update to 2.2.18?

kookyabird commented 3 years ago

It seems the current version available through the VS Marketplace has an issue with the configuration screen. I've uninstalled and reinstalled the extension and I see a simple, "An error occurred loading this property page"

image

I'm guessing it's because not all the localization files have the new option string added.

buchizo commented 3 years ago

@kookyabird sorry, i forgot localized string for English. i quickly fix to 2.2.18.1

buchizo commented 3 years ago

I did it. image

kookyabird commented 3 years ago

That did it. It's working as your sample did.

I did have an issue where the preview window in ReSharper didn't want to actually render until I:

I consider this issue resolved. I'll do some testing to make sure that this weird behavior I just described is a one-off, or if I can make it happen again.

Thank you very much for all the work you've done!