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

feat: added text support to system tray - macos, closes #65 #369

Closed
wants to merge 2 commits into from
Closed

Conversation

BenJeau
Copy link

@BenJeau BenJeau commented Apr 19, 2022

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

Here's an example of the change, closes #65

Screen.Recording.2022-04-18.at.9.00.33.PM.mov

As this is my first contribution to tauri, please let me know of anything that needs to be done/changed for this to be accepted to be merged

@BenJeau BenJeau requested review from a team April 19, 2022 01:08
@BenJeau BenJeau requested a review from a team as a code owner April 19, 2022 01:15
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

Thanks, just a small change needed.

Comment on lines +108 to +117
/// Set new tray menu title.
///
/// ## Platform-specific
///
/// Only works on **macOS**
#[cfg(target_os = "macos")]
pub fn set_title(&mut self, title: &str) {
self.0.set_title(title)
}

Copy link
Member

Choose a reason for hiding this comment

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

This should be in SystemTrayExtMacOS trait and you should make a builder variant for SystemTrayBuilderExtMacOS.

You can find them in src/platform/macos.rs

@BenJeau BenJeau requested a review from a team as a code owner June 25, 2022 17:27
@patrick91
Copy link

this looks very promising, is there any way I can test this in my app? :)

@vojty
Copy link
Contributor

vojty commented Sep 9, 2022

Since I'm waiting for this feature as well I created a new PR #554

The changes are the same as in this PR, I've just moved things to the existing traits as @amrbashir suggested and added support for the builder variant.

@amrbashir
Copy link
Member

amrbashir commented Sep 10, 2022

closing in favor of #554. Thanks @BenJeau and @vojty

@amrbashir amrbashir closed this Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ability to show text in the system tray/menu bar
4 participants