UpdateTheme updates all theme variables
(themeConfig config.ThemeConfig)
| 49 | |
| 50 | // UpdateTheme updates all theme variables |
| 51 | func UpdateTheme(themeConfig config.ThemeConfig) { |
| 52 | ActiveBorderColor = GetGocuiStyle(themeConfig.ActiveBorderColor) |
| 53 | InactiveBorderColor = GetGocuiStyle(themeConfig.InactiveBorderColor) |
| 54 | SearchingActiveBorderColor = GetGocuiStyle(themeConfig.SearchingActiveBorderColor) |
| 55 | SelectedLineBgColor = GetTextStyle(themeConfig.SelectedLineBgColor, true) |
| 56 | InactiveViewSelectedLineBgColor = GetTextStyle(themeConfig.InactiveViewSelectedLineBgColor, true) |
| 57 | |
| 58 | cherryPickedCommitBgTextStyle := GetTextStyle(themeConfig.CherryPickedCommitBgColor, true) |
| 59 | cherryPickedCommitFgTextStyle := GetTextStyle(themeConfig.CherryPickedCommitFgColor, false) |
| 60 | CherryPickedCommitTextStyle = cherryPickedCommitBgTextStyle.MergeStyle(cherryPickedCommitFgTextStyle) |
| 61 | |
| 62 | markedBaseCommitBgTextStyle := GetTextStyle(themeConfig.MarkedBaseCommitBgColor, true) |
| 63 | markedBaseCommitFgTextStyle := GetTextStyle(themeConfig.MarkedBaseCommitFgColor, false) |
| 64 | MarkedBaseCommitTextStyle = markedBaseCommitBgTextStyle.MergeStyle(markedBaseCommitFgTextStyle) |
| 65 | |
| 66 | unstagedChangesTextStyle := GetTextStyle(themeConfig.UnstagedChangesColor, false) |
| 67 | UnstagedChangesColor = unstagedChangesTextStyle |
| 68 | |
| 69 | GocuiSelectedLineBgColor = GetGocuiStyle(themeConfig.SelectedLineBgColor) |
| 70 | GocuiInactiveViewSelectedLineBgColor = GetGocuiStyle(themeConfig.InactiveViewSelectedLineBgColor) |
| 71 | OptionsColor = GetGocuiStyle(themeConfig.OptionsTextColor) |
| 72 | OptionsFgColor = GetTextStyle(themeConfig.OptionsTextColor, false) |
| 73 | |
| 74 | DefaultTextColor = GetTextStyle(themeConfig.DefaultFgColor, false) |
| 75 | GocuiDefaultTextColor = GetGocuiStyle(themeConfig.DefaultFgColor) |
| 76 | } |
no test coverage detected