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

modules/gcal: Use colors.eventTime for timestamp of event

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
This commit is contained in:
Indradhanush Gupta 2019-09-18 01:23:27 +05:30
parent 1ce29f4930
commit 9e2bc00b15

View File

@ -48,7 +48,7 @@ func (widget *Widget) content() (string, string, bool) {
} }
for _, calEvent := range calEvents { 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() { if calEvent.AllDay() {
timestamp = "" timestamp = ""
} }
@ -116,6 +116,10 @@ func (widget *Widget) descriptionColor(calEvent *CalEvent) string {
return widget.settings.colors.description 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 { func (widget *Widget) eventSummary(calEvent *CalEvent, conflict bool) string {
summary := calEvent.event.Summary summary := calEvent.event.Summary