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

Adding a "Start Minimized" functionality. #285

Merged
merged 2 commits into from
Jan 20, 2024

Conversation

Meedtone
Copy link
Contributor

Tested on Windows 11 22H2, Electron 6.1.5
Addresses #169

Notes:

  • Option only shows when "Show Tray Icon" is on.
  • Increased the window height slightly to prevent scrollbar from showing.
  • Variable show from createWindow() now defaults to false.
  • Opted for win.close() instead of win.minimize() when minimizing to tray.
  • Removed the last else if statement in main.js line 322 because I couldn't get it to work otherwise lol. Things seem to work fine though.

Preview Screenshots:
s1
s2

src/app.html Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe to reduce clutter we could put this in the tray dropdown since that's where enabling start at boot is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, that seems better actually lol. Will update.

Changes to be committed:
	modified:   src/app.html
	modified:   src/app.js
	modified:   src/main.js
Changes to be committed:
	modified:   src/app.html
	modified:   src/app.js
	modified:   src/main.js
	new file:   src/utils/start_minimized_handler.js
Copy link
Collaborator

@NotLazy NotLazy left a comment

Choose a reason for hiding this comment

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

I tested this change on macOS and it looks to be working great.

I thought there might be an issue with running the app twice not opening the app window, but it works as expected, and the window does open when running the app twice.

Great work.

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.

2 participants