msstyleEditor icon indicating copy to clipboard operation
msstyleEditor copied to clipboard

How to change the selection / hover color in explorer?

Open F1mmel opened this issue 1 year ago • 13 comments

Windows Version: Win11 23H2

Question Hello, I want to edit my current theme. Exactly I do want to change the color of the selected item and the hover color over a item. Which property do I have to edit? Check my screenshot. I want this blue to some purple color. Thanks!

Things you already tried I installed the tool and imported my theme I want to edit.

Additional context image

Checklist

  • [x] My uxtheme.dll is patched
  • [x] I am using the latest version of msstyleEditor
  • [x] I checked the Wiki
  • [x] None of the other issues cover this

F1mmel avatar Nov 03 '24 15:11 F1mmel

TreeItem subclass is what you want to edit.

Msstyle Editor Picture

Screenshot 2024-11-10 134151

Undisputed00x avatar Nov 10 '24 11:11 Undisputed00x

Thanks for your reply. Which color on the right panel do I have to change though? image

F1mmel avatar Nov 10 '24 11:11 F1mmel

Change the background by adding an IMAGEFILE, as you can see the background you see is an .png image. Create an image in figma for example and import it in your theme, make it as small as possible like 15x15 or something like that.

-Edit- But after importing an IMAGEFILE, then Contentmargins, Sizingmargins and SizingType come into play. SizingType:stretch takes that small png and stretches it.

Sizingmargin takes the amount of pixels we set not to stretch for example in a 15x15 image file, we can set the Sizingmargins (left,top,right,bottom) as 7; 8; 8; 7; bigger values than that break the image stretching due to the size of the image.

Contentmargins as far as i know change the image offset but doesn't work some times

Undisputed00x avatar Nov 10 '24 12:11 Undisputed00x

So you mean I should change the image from HBOT and HOTSELECTED right? And this changes my background selection color in the explorer? Thanks!

F1mmel avatar Nov 10 '24 12:11 F1mmel

So you mean I should change the image from HBOT and HOTSELECTED right? And this changes my background selection color in the explorer? Thanks!

Correct.

Undisputed00x avatar Nov 10 '24 12:11 Undisputed00x

Sorry for the late response. How do I import my own .png file now? image The Import button is not available? Thanks

F1mmel avatar Nov 11 '24 16:11 F1mmel

@Undisputed00x Got it working. Thank you alot. Do you know which property the mouse drag selection rect I have to edit to change the color? image

Also is is possible to shrink down the close, minimize, ... buttons with msstyleEditor? image I think I applied a custom theme with UXThemePatcher?

Thanks

F1mmel avatar Nov 11 '24 18:11 F1mmel

@Undisputed00x Got it working. Thank you alot. Do you know which property the mouse drag selection rect I have to edit to change the color?

  1. Sysmetrics > Highlight + Hotlight or edit those through registry in HKEY_CURRENT_USER\Control Panel\Colors

Also is is possible to shrink down the close, minimize, ... buttons with msstyleEditor?

  1. Caption buttons are placed in DWMWindow also you can play with theme metrics in Sysmetrics which can be edited also in registry HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics

Undisputed00x avatar Nov 11 '24 23:11 Undisputed00x

Hello, I have done everything as described here. I have under “Explorer::TreeView/TREEITEM” and under “DarkMode_Explorer::TreeView/TREEITEM”, I inserted the graphics (IMAGES) and also edited the properties under HBOT and HOTSELECTED. However, absolutely nothing changes in my theme! Have I overlooked something? Is there anything else that needs to be changed?

Sorry for my bad english, is translated from DeepL.

Mira-Bellenbaum avatar Nov 12 '24 11:11 Mira-Bellenbaum

@Undisputed00x Thanks got it working!

Now the last two question. Where do I change the file selection in the explorer? image

Also in the context menu there is this selection, probably the same? image

Where do I change these two? Thanks!

Edit: Is it also possible to change the color to a transparent one? I want some purple-ish but a bit transparent one. Maybe I do have to set a flag for this?

F1mmel avatar Nov 13 '24 18:11 F1mmel

@Undisputed00x Thanks got it working!

Now the last two question. Where do I change the file selection in the explorer? image

Also in the context menu there is this selection, probably the same? image

Where do I change these two? Thanks!

  1. DarkMode_Explorer::ListView > ListItem
  2. DarkMode_ImmersiveStart::Menu > 27

Edit: Is it also possible to change the color to a transparent one? I want some purple-ish but a bit transparent one. Maybe I do have to set a flag for this?

On images yes, just create your image and adjust the alpha value in the colors

Im gonna make a documentation of msstyles, probably in the wiki of this repo

Undisputed00x avatar Nov 13 '24 19:11 Undisputed00x

@Undisputed00x Sorry, where is the 27? I only have these: image

F1mmel avatar Nov 13 '24 20:11 F1mmel

We've gone far from the issue's topic, open a discussion ticket please.

Undisputed00x avatar Nov 13 '24 20:11 Undisputed00x

So you mean I should change the image from HBOT and HOTSELECTED right? And this changes my background selection color in the explorer? Thanks!

@F1mmel Could you tell me if it worked. And how you did it.I want to change the highlight color to something that I can easily see. Also how did u get the import button working? Image

reaper9037 avatar May 30 '25 07:05 reaper9037