Align main editor focus frame with other text boxes#11562
Conversation
Disable AvaloniaEdit's internal focus adorners in the main subtitle editor so focus is rendered by the wrapper border only. Match the focused border thickness used by Fluent TextBox controls, keeping the subtitle editor visually consistent with the OCR window and other text boxes when color tags are enabled. Avoid layout shift when focus changes by compensating the thicker focused border with reduced wrapper padding, keeping surrounding controls in place.
|
@mjuhasz In dark mode, when the line in the list becomes unfocused, the color is very close to the default color, anyway to change that?
As you can see, you can barely tell that line 12 is selected but unfocused. Also, I think it might be a good idea to keep the border color of the focused textbox blue, it doesn't clash with dark mode and makes it clearer that the textbox is focused. Right now, the border just becomes not white. |
|
@OmrSi This is not intentional. It should look like this: Screen.Recording.2026-06-12.at.9.21.05.PM.movI have to verify this but I think what's happening is that for the unfocused state Avalonia is pulling the System accent color which is not blue on your machine. I'll investigate this. |
|
@mjuhasz You are correct; that is my System's accent color. :D When I changed it from the settings, it changed in SE right away. |
|
@OmrSi Right, what I can do here is that I make the unfocused row use the same color as the focused row. That focused-row blue comes from Avalonia so the focused and unfocused rows will be using the exact same blue, just lower opacity (same but faint color) for unfocused rows. I verify this for list boxes and the edit box focus indicator as well (the components I touched earlier today). It's an unfortunate coincidence that my system color is so very close to the Avalonia blue because of which it was not noticeable that the focused/unfocused colors were coming from different sources. |
|
@mjuhasz No, no. I think they are coming from the same source, so I'm not sure that it's the code that needs to be changed, but rather my accent color. To clarify, here is a focused line with my accent color: So I think it's working as intended, when getting unfocused, it uses the same color but lighter. |
|
@OmrSi Yes, I've been looking into this and reviewed pretty much the entire application, as the saying goes, "measure twice before you cut once".
You are right, I verified this. There is only one place I found where the color is not coming from the system color: the main window edit box when color tags are enabled is hardcoded to DodgerBlue. Other than that, the focus button background color is not following the system accent but that is configurable in Settings.
Pretty much. What needs to be fixed is the hardcoded blue focus indicator around the edit box -> it should use the system accent color. I fixed it here: #11576 What could be tweaked is how faint the unfocused state should be: less faint -> you will hardly see if the subtitle grid is active; more faint-> you will hardly see which row is selected. It looks pretty decent to me currently but time will tell.
Agreed. That accent color is not a great choice for the dark theme. I can replicate your case by choosing Graphite system accent color which naturally is a poor fit for the dark color scheme. If I insisted on using Graphite for some reason I'd adjust the dark theme background color in Settings (it's configurable). Hard-coding colors here and there in the app would make it look like a Frankenstein-product. Like the bug I fixed above. |
|
To be honest with you, it would be cool if we could set the highlight color manually. In SE4, it used to be Blue even in dark mode: Though I'm not sure if @niksedk would be okay with that, maybe a hidden option like Anyway, worst-case scenario, I can make my own version with a custom color. :D |




The focus frame of the main subtitle edit box was inconsistent in two ways: its thickness varied depending on whether color tags were enabled, and it did not match the focus frame used by other edit- and text boxes in the app.
Changes
edit.box.focus.frame.mov