sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
814 stars 40 forks source link

[ST4] Include sidebar into "highlighted" switching #3900

Open deathaxe opened 3 years ago

deathaxe commented 3 years ago

Problem description

As of ST 4095 the one view which has focus is marked highlighted so themes can make it stand out clearly.

If the sidebar has focus (e.g.: by pressing ctrl+0) most key commands such as keyboard navigation via arrow keys are handled by sidebar. From that point of view none of the views/sheets has focus then. Therefore it would feel more natural if none of the normal views or sheets would show highlighted then.

Preferred solution

Hand over highlighted state to sidebar if it has focus.

Means: Set the attribute for sidebar and remove it from all views/sheets.

This would probably allow to modify background or even show scrollbars depending on whether a view has focus or is hovered. Some kind of semi-overlay scrollbars so to say. Or in case scrollbars are rendered permanently only the view which is highlighted (or the sidebar) can display it.

Alternatives

Just remove highlighted attribute from views/sheets in case sidebar has focus.

wbond commented 3 years ago

I intended to implement this in build 4099 but ran into some issues with how input focus is assigned, which precluded me from finishing this.

Just remove highlighted attribute from views/sheets in case sidebar has focus.

Originally the implementation of highlighting did this, but it was confusing since various commands and panels operate on the view that more recently had input focus.