Sublime Forum

Is there a way to theme a panel when it has focus?

#1

Hi all,
Does anyone know if it’s possible to style a panel (particularly the find[/find-replace/find-in-files] panel) so that it has a different background color when it’s focused vs. unfocused?

The issue is sometimes, I’ll switch into the app, and focus will be in the find panel, but because it’s not clear where the focus is at, I’ll start pressing the arrow key, thinking I’m in the main window. What happens is that my file starts jumping around because it’s moving through my search history.
This goes also with any command such as Undo or redo, etc.
Because it’s not immediately clear where my focus is, I start executing commands in the wrong area and those commands have impact on that panel.

Maybe there’s a better way to solve this, but my idea was,if there’s a way to theme the panel’s focus state, I can default it to being a dark color (to match the background color of my color scheme), and when it has focus, give it a lighter color.

This way, I can easily see if there’s contrast between the fields and if so, I know it’s being focused.

Does anyone know if this works?

Thanks!

0 Likes

#2

It’s not possible, unfortunately

0 Likes

#3

Hi Jon,
Thanks for the reply, it’s really appreciated.

Even if it’s not exposed to end developers, is there any way to fix the issue (maybe on your end)? Basically, the issue being that I often end up mistakenly operating in the wrong area, which leads to a very harsh user experience. Depending on what I do in there, it can end up scrolling the page around, or removing my current search, etc.

If I’m the only one who has this issue, I can try to and work around it, but I wonder if there’s a way to fix it. Even using cmd+i to have the find close after pressing enter, because the search is happening as I type, I often wrongly assume I’m in the wrong context.

Maybe this isn’t a huge deal to most people, and if not, don’t spend time on it, but it might be something others are struggling with.

It might be enough, given my search behavior, for me to add a shortcut for one of the find commands to refocus the window.

And if this comes out as one of those long stream of consciousness posts that make no sense, feel free to ignore and keep up the great work.

Thanks Jon,

0 Likes

#4

Not the exact same issue, but as I’ve switched to the Colemak layout I find myself accidentally hitting Ctrl+: when I mean to hit Ctrl+ . I only mean to exit insert mode or such, but instead the cursor is thrown to the top of the file and I’m dropped into the Go To Anything panel searching by tag. :unamused: I wish `` was implemented so I could quickly return to where I was working, but not yet…

0 Likes