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

Main window should hide when tray icon clicked if already visible #1050

Closed
blackwind opened this issue Dec 23, 2017 · 6 comments
Closed

Main window should hide when tray icon clicked if already visible #1050

blackwind opened this issue Dec 23, 2017 · 6 comments

Comments

@blackwind
Copy link

Currently, clicking the tray icon shows the main window no matter what. I'd like to suggest that a tray icon click hide the main window if it's currently visible. This is a standard practice in most torrent clients and is great for checking your torrents and very quickly getting back to work.

@leonsoft-kras
Copy link
Contributor

good offer. I'll try to implement.

@antekgla
Copy link
Contributor

good offer. I'll try to implement.

procedure TMainForm.TrayIconDblClick(Sender: TObject);
begin
{$ifndef darwin}
//  acShowApp.Execute;
if (MainForm.Visible = false) or (MainForm.WindowState = wsMinimized) then
    MainForm.ShowApp
    else
    MainForm.HideApp;
{$endif darwin}
end;  

@blackwind
Copy link
Author

Looks good to me. Can you submit a pull request?

@antekgla
Copy link
Contributor

If @leonsoft-kras dont have a better code I do it!

@leonsoft-kras
Copy link
Contributor

I did it differently recently, but I'll try to see your version.

In general there was no time. I wanted to ask a question, but for now I'll look at your option.

@leonsoft-kras
Copy link
Contributor

thanks! beautiful solution))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants