Thread: Quick Question
View Single Post
Old 12-11-2020, 11:08 AM   #62
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,816
Karma: 6000000
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BetterRed View Post
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.

Last edited by KevinH; 12-11-2020 at 12:04 PM.
KevinH is offline   Reply With Quote