mdwheele / owls

🦉 Easy management of /etc/hosts built on top of Electron.
MIT License
3 stars 0 forks source link

Add minimize and close buttons to window #21

Closed rmeby closed 4 years ago

rmeby commented 4 years ago

Here's a pretty straightforward way to do this. Not sure if it is ideal for you style-wise. I tested it on Windows, macOS, and Ubuntu with results shown below.

Windows 10 1909

macOS Catalina 10.15.6

Ubuntu 20.04

Screen Shot 2020-10-02 at 2 08 09 PM
mdwheele commented 4 years ago

Hey @rmeby!

Thanks for the contribution!

For consistency across platforms, we would likely want the default browser chrome disabled and would include these controls into the "title bar" implemented at https://github.com/mdwheele/owls/blob/master/src/views/Home.vue#L3-L30. So, things may look somewhat different between Windows, MacOS and Linux, but we'd want to control styling of that (similar to what you see in other Electron applications such as Slack, Discord, etc.)

image

If you would like to take a crack at that and need help getting started, let me know!

rmeby commented 4 years ago

@mdwheele Understood. I will work on this! Thanks for the information.

rmeby commented 4 years ago

Please ignore that comment. Realized what I'm doing wrong 😅

mdwheele commented 4 years ago

No worries!

You'll want to get ahold of an instance of BrowserWindow to take care of minimize/close. Let's leave maximize out for now.

rmeby commented 4 years ago

Thanks @mdwheele! Made some good progress on this. Having some trouble dealing with the search box spacing, but nearly there!

mdwheele commented 4 years ago

Hey @rmeby, how's everything going? Do you think this is ready for review?

rmeby commented 4 years ago

@mdwheele Yes, please take a look when possible. It looks pretty good to me, but not sure if it's what is desired.

rmeby commented 4 years ago

@mdwheele Thanks for the feedback! Made the requested changes with https://github.com/mdwheele/owls/pull/21/commits/c19cadb437fbe20a0398e84c41e593f18a50d66a

mdwheele commented 4 years ago

Thanks for the contribution @rmeby!

I've made some small styling changes, rebased commits from this branch and merged to master. Since the the commit hashes have changed due to the rebase, GitHub won't auto-merge this pull request. I've marked this as hacktoberfest-accepted so you get points there and am closing this out.