Change hover/active background color of Find actions buttons in Visual Studio Code - themes

In the Updated Find actions section of the Visual Studio Code November 2021 (version 1.63) update release notes, they show that the Find actions buttons (Match Case, Match Whole Word, and Use Regular Expression) hover and active states can be styled (the example gif shows blue). They also mention that the style for the buttons in the search view now use the same style as the editor.
Which properties can I target using workbench.colorCustomizations in settings.json to change the background color of those buttons when hovering over them, or when they are active (the states which are shown in blue in the example gif)?
I've searched the Action colors, Button control, and Input control sections of the Theme Color documentation but I couldn't find the right properties. toolbar.hoverBackground changes the hover color of the Find toolbar's Previous Match, Next Match, Find in Selection, and Close buttons, but not the ones inside the Find text field.
I've also tried using Developer: Inspect Editor Tokens and Scopes in the Command Palette, which is great for identifying theme color property names for code in the editor panel, but it can't be used for the VS Code application UI elements.

Try this colorCustomizations in your settings.json:
"workbench.colorCustomizations": {
"editorWidget.foreground": "#f00",
"icon.foreground": "#f00" // colors the arrows/close in the Find widget
"inputOption.activeBorder": "#666", // active states
"inputOption.activeBackground": "#777676",
"inputOption.activeForeground": "#fff",
"inputOption.hoverBackground": "#ff0000", // hover state
}
From Editor widget colors. That is a "Find Widget".
The "icon.foreground" setting will also affect the arrows/close icons in the Search View.
And the inputOption settings will affect the Search view buttons as well. I don't think there is any to theme those Find Widget hover/active states without also affecting the Search view buttons hover/active states.

Related

Visual Studio 2019 Vertical Tabs Background Color

Anybody knows how to set the background for the vertical tabs?
I love that feature, but with my favourite theme you can't see squat...
...its gray on gray
I have the same problem. I wasn't able to find a way to change the background color, but at least I found a way to change the foreground color, so that at least the tabs become visible.
I have installed Color Theme Editor for VS 2019. It comes with many themes, which you can make a copy of, then edit the copy. In the color theme editor you must search for Document Well - Tab, then scroll to Unselected. Changing the background color here unfortunately only affects horizontal tabs, but changing the foreground do affects both horizontal and vertical tabs.
Here is a screenshot of the extension in action:
Don't forget to click on the "Save and apply theme" in the upper left corner of the extension page.

How to customize the VS2015 Method Signature Pop-Up's Text Color?

I've started using Visual Studio 2015 and one thing I've noticed is the new fancy rich-text formatted Preview functionality when hovering over a Method, .ctor, Property etc (compared to the bare tooltip I see in VS2013), which looks for example like this (mouse cursor is not shown here):
However, this is, most likely due to my general text color & font customization, in parts barely readable.
Does anyone know what's the correct name and category for this enhanced ToolTip is in VS's Tools > Options > Environment > Fonts and Colors?
The tooltip code colors correspond to the colors you have set for the editor window. The white you see is the same as you see in the editor.
You might want to change the tooltip background color instead to something darker.
You want to change the 'Editor Tooltip'
Use these steps:
Options -> Environment -> Fonts & Colors
Show settings for: Editor Tooltip
Adjust 'Plain Text'

What's the name of the bar below the Property grid in VS?

I'm using the Visual Studio Color Theme Editor extension to help darken up VS2010, found a nice theme that I like however I've got one big problem with it.
On the Property sheet, at the bottom where it says the name of the property and a sort description this theme I'm using is impossible to read; Black on a dark grey background. Unfortunately, I don't know what this specific segment of the Property window is called to change it.
You can not change the text color with the extension.
To figure that out, copy FFFFFF, select all line in the theme editor configuration pane (with Shift), press Ctrl+V (yes, you can do that, pretty neat !) and hit apply : everything that can be themed will then appear white. The text however, will stay black.
You can hopefully change the background color : It's called ToolWindowBackground. It will affect all tool windows of course. There's no specific item for this window in particular.

Change text color for Selected Text in Visual Studio [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
I can't edit selected text foreground color in Visual Studio 2010. Anyone know how to do this?
In the Options->Environment->Fonts and Colors dialog you can choose Selected Text in the Display Items listbox, but this only allows you to change the Item background property.
How does one change the text color, so that for example I can have white text on a blue background when I select an item? Also, is there a way to bold the text (the Bold box is disabled also).
Note: Here is the question that asks about the background color change.
The foreground color in the VS2010 editor is not set in one place but in many within the Options Form. If you have Resharper installed it also sets some foreground properties. The reason VS2010 does this is to allow individual items (words) within the foreground to express different colors depending on their type (e.g. comments, value types, enums etc.) even when they are selected. In other words VS2010 applies a priority to the foreground color for these specific types over the generic selected text color format.
For instance, when you look at the Fonts and Colors dialog you will notice the entry for User Types. On my VS2010 its RGB value is RGB(43, 145, 175) which looks like teal. If I change that color to Red, the User Types on my editor's foreground color changes to Red and remains Red even when with the selection area.
In some instances VS2010 will override the foreground color such as applying a breakpoint to a line. On my VS2010 enabled breakpoints when in editing mode have a white foreground color, regardless of the terms in the line.
To answer your question of how one would change the foreground color for all selected text, VS2010 does not support this out of the box.
I wrote a VS2010 Extension as outlined here. I used the example code as is and added the lines:
selectedText[EditorFormatDefinition.ForegroundBrushId] = Brushes.Green;
formatMap.SetProperties("Selected Text", selectedText);
...but this did not change the foreground color of selected text to green. It stayed black. This is probably due to the VS2010 WPF editor using a Priority Order for each format and one or more other formats overriding the selected text foreground color.
Have you tried setting the colors on the 'Highlighted Reference' option in the Fonts and Colors window?
There is no individual setting for the Selected Text Foreground properties, it uses the Plain Text Settings for the Foreground in the Options Form, but this will only work for normal text, the Foreground colors for Properties, Comments and other specialty colored text will remain the same, there is no overriding Foreground color that can be used for all items.

How to locate the formatting of a line in the Options/Fonts and Colors dialog?

I am using Resharper 6.x with VS2010. One of the features is that if you double click on a variable, it is highlighted and then other usages of the variable are highlighted, like so:
The background and foreground colors of the highlighted variable are too close to each other and I am trying to change it in the Options/Fonts and Colors dialog. It has a small Sample window (below). I've gone through the entire list of display items and can't find the one matching what I see in the coding window.
So 2 questions:
Which display item should I change to affect the back/fore colors of the highlighted variables?
Is there some tool that that will point me to the display item in question for any piece of code?
P.S. I am using the Ragnarok as my base color theme.
P.P.S. This may have nothing to do with Resharper. I turned it off and the coloring was still there. I guess my original question still stands - how to affect the colors of the highlighted variables.
Visual Studio 2010 Reference Highlighting
As you already presumed: The reference highlighting of current selection is not a ReSharper feature but a VS 2010 feature. So you need to look at VS items in Fonts and Colors dialog.
The right display item is Highlighted Reference.
ReSharper Reference Highlighting
ReSharper's equivalent is Highlight usages in file by pressing Shift+Alt+F11.
Then all read references have light blue background color (related display item in Fonts and Colors dialog is ReSharper Read Usage).
And all write references have rose background color (related display item in Fonts and Colors dialog is ReSharper Write Usage).
But the disadvantage of ReSharper's reference highlighting is that you need to press a shortcut. VS does the highlighting automatically.

Resources