1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Google Calendar subheading now obey global subheading color (#798)

This can still be over-written by setting:

```
   gcal:
      colors:
        day: "orange::b"
```
explicitly in your gCal configuration.

Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
Chris Cummer 2019-12-17 21:39:49 -08:00 committed by GitHub
parent 10f761dbcb
commit d88b3ebaac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -83,8 +83,7 @@ func (widget *Widget) dayDivider(event, prevEvent *CalEvent) string {
eventStartDay := toMidnight(event.Start()) eventStartDay := toMidnight(event.Start())
if !eventStartDay.Equal(prevStartDay) { if !eventStartDay.Equal(prevStartDay) {
return fmt.Sprintf("[%s]",
return fmt.Sprintf("[%s::b]",
widget.settings.colors.day) + widget.settings.colors.day) +
event.Start().Format(utils.FullDateFormat) + event.Start().Format(utils.FullDateFormat) +
"\n" "\n"

View File

@ -58,7 +58,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
calendarReadLevel: ymlConfig.UString("calendarReadLevel", "writer"), calendarReadLevel: ymlConfig.UString("calendarReadLevel", "writer"),
} }
settings.colors.day = ymlConfig.UString("colors.day", "forestgreen") settings.colors.day = ymlConfig.UString("colors.day", settings.common.Colors.Subheading)
settings.colors.description = ymlConfig.UString("colors.description", "white") settings.colors.description = ymlConfig.UString("colors.description", "white")
// settings.colors.eventTime is a new feature introduced via issue #638. Prior to this, the color of the event // settings.colors.eventTime is a new feature introduced via issue #638. Prior to this, the color of the event
// time was (unintentionally) customized via settings.colors.description. To maintain backwards compatibility // time was (unintentionally) customized via settings.colors.description. To maintain backwards compatibility