Quote:
Originally Posted by BetterRed
Panels such as the Book browser and ToC change the background colour of the current item (see third screen shot below) when they don't have focus. Perhaps a similar approach could be applied to the current display line in the CV panel; on reflection, that would be better than removing the highlight.
|
This is quite easy to do. On loss of focus invoke HighlightCurrentLine, and on regain of focus invoke HighlightCurrentLine, and then modify that routine to check if CV has focus to determine what background colour to highlight with.
As proof of concept, I used the line# background color to highlight the current line when no focus and the normal highlight the line color when it has focus.
This makes detecting if has focus or not much easier, while still allowing easy visual syncing between Preview and CodeView and with the various other dockwidgets.
If that colour combination works for you, I could easily push this to master.