Assets to make the tray icon dynamic#108
Open
pieterdd wants to merge 2 commits intotom-james-watson:masterfrom
Open
Assets to make the tray icon dynamic#108pieterdd wants to merge 2 commits intotom-james-watson:masterfrom
pieterdd wants to merge 2 commits intotom-james-watson:masterfrom
Conversation
This may prove useful later as a template to generate dynamic tray icons.
Owner
|
Hello! This is really awesome! I'm currently working on a new version of the app which has a huge number of code changes. I'll revisit this once that is finished and released, which should be over the next couple of weeks 🙏. |
|
@tom-james-watson Any chance this change could be integrated now? Monochrome icons for dark desktop themes would be great! |
Owner
|
I don't have the motivation/bandwidth to work on this myself at the moment. PRs are welcome, of course! |
|
@tom-james-watson What work is needed prior to merge? |
Owner
|
Oops replied to quickly and forgot this was already on a PR. There needs to be some new code that sets the tray icon dynamically based on the time left to the next break. Agree that ideally the icons would just be monochrome at this point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in #107, I've generated dynamic tray icons that indicate how close you are to your next break. I've made 10 of them indicating 0%, 10%, 20%, ... 80%, 90% and 100%. Given the size of the tray icon this should be granular enough for users.
Was going to contribute the code for this as well but ran into some roadblocks. I was expecting
getSettings().breakLengthto be an object indicating a period of time like a Moment.js Duration object. According to the type definition it's actually a Date that's set to 1899-12-31 00:20:00, and according to VSCode's debugger it's a string. Which means that before I can get started on this feature, I'd have to refactor existing usages ofbreakLengthso that reality is consistent with the type definition. Due to time constraints, I'll just stick to contributing the icons for now.Included is also a vector recreation of the tray icon in monochrome. I made it so it's easier to generate an additional set of tray icons for Mac in the future.