From db0a1586d99393cda79e6022f3b3b8b4138b0e8b Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 16 Jun 2024 18:09:21 +0200 Subject: Highlight inactive selection in bold An inactive selection is one where the view is part of the context stack, but not the active view. For example, the files view when you enter the staging panel, or any view when you open a panel. --- pkg/theme/theme.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/theme/theme.go') diff --git a/pkg/theme/theme.go b/pkg/theme/theme.go index 78be46fb6..acd8ebf71 100644 --- a/pkg/theme/theme.go +++ b/pkg/theme/theme.go @@ -24,11 +24,15 @@ var ( // GocuiSelectedLineBgColor is the background color for the selected line in gocui GocuiSelectedLineBgColor gocui.Attribute + // GocuiInactiveViewSelectedLineBgColor is the background color for the selected line in gocui if the view doesn't have focus + GocuiInactiveViewSelectedLineBgColor gocui.Attribute OptionsColor gocui.Attribute // SelectedLineBgColor is the background color for the selected line SelectedLineBgColor = style.New() + // InactiveViewSelectedLineBgColor is the background color for the selected line if the view doesn't have the focus + InactiveViewSelectedLineBgColor = style.New() // CherryPickedCommitColor is the text style when cherry picking a commit CherryPickedCommitTextStyle = style.New() @@ -49,6 +53,7 @@ func UpdateTheme(themeConfig config.ThemeConfig) { InactiveBorderColor = GetGocuiStyle(themeConfig.InactiveBorderColor) SearchingActiveBorderColor = GetGocuiStyle(themeConfig.SearchingActiveBorderColor) SelectedLineBgColor = GetTextStyle(themeConfig.SelectedLineBgColor, true) + InactiveViewSelectedLineBgColor = GetTextStyle(themeConfig.InactiveViewSelectedLineBgColor, true) cherryPickedCommitBgTextStyle := GetTextStyle(themeConfig.CherryPickedCommitBgColor, true) cherryPickedCommitFgTextStyle := GetTextStyle(themeConfig.CherryPickedCommitFgColor, false) @@ -62,6 +67,7 @@ func UpdateTheme(themeConfig config.ThemeConfig) { UnstagedChangesColor = unstagedChangesTextStyle GocuiSelectedLineBgColor = GetGocuiStyle(themeConfig.SelectedLineBgColor) + GocuiInactiveViewSelectedLineBgColor = GetGocuiStyle(themeConfig.InactiveViewSelectedLineBgColor) OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor) OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false) -- cgit v1.2.3