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:
@@ -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 = ""
|
||||
}
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user