Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add colors.eventTime to gcal #640

Merged

Conversation

indradhanush
Copy link
Contributor

@indradhanush indradhanush commented Sep 17, 2019

Fixes #638

Default setting:
s_2019-09-18_011615

Custom setting:

      colors:
        title: "orange"
        eventTime: "pink"
        description: "lightgrey"  
        highlights:
        - ['Engineering team daily', 'lightblue']

s_2019-09-18_011551

@@ -55,6 +56,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co

settings.colors.day = ymlConfig.UString("colors.day", "forestgreen")
settings.colors.description = ymlConfig.UString("colors.description", "white")
settings.colors.eventTime = ymlConfig.UString("colors.eventTime", "white")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the event that someone is already using descriptionColor to change the look of the time, we'll need to support that in a backwards-compatible way.

You can do that by changing this line to:

settings.colors.eventTime = ymlConfig.UString("colors.eventTime",ymlConfig.UString("colors.descriptionColor", "white"))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now understood your original comment on the issue. I was wondering if ymlConfig.UString occurring twice was a typo in that comment. 😅

This is a good idea. Fixed. 👌

This will let the user set a fixed color for the event time
irrespective of colors used in highlights.
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 wtfutil#638
@senorprogrammer senorprogrammer merged commit 9e2bc00 into wtfutil:master Sep 19, 2019
@senorprogrammer
Copy link
Collaborator

Perfect, thanks!

@indradhanush indradhanush deleted the feature/gcal-event-time-color branch September 19, 2019 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

colors.description in Google calendar changes colour of time in the event's title
2 participants