Skip to content

Commit

Permalink
modules/gcal: Use colors.eventTime for timestamp of event
Browse files Browse the repository at this point in the history
Color of description should not change the color of event time. This
commit uses the independent setting color.eventTime instead. This
defaults to "white" and is consistent with the current behaviour when
a value for colors.description is not set.

Fixes #638
  • Loading branch information
indradhanush committed Sep 17, 2019
1 parent 1ce29f4 commit 9e2bc00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/gcal/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (widget *Widget) content() (string, string, bool) {
}

for _, calEvent := range calEvents {
timestamp := fmt.Sprintf("[%s]%s", widget.descriptionColor(calEvent), calEvent.Timestamp())
timestamp := fmt.Sprintf("[%s]%s", widget.eventTimeColor(calEvent), calEvent.Timestamp())
if calEvent.AllDay() {
timestamp = ""
}
Expand Down Expand Up @@ -116,6 +116,10 @@ func (widget *Widget) descriptionColor(calEvent *CalEvent) string {
return widget.settings.colors.description
}

func (widget *Widget) eventTimeColor(calEvent *CalEvent) string {
return widget.settings.colors.eventTime
}

func (widget *Widget) eventSummary(calEvent *CalEvent, conflict bool) string {
summary := calEvent.event.Summary

Expand Down

0 comments on commit 9e2bc00

Please sign in to comment.