asticode / go-astilectron-demo

Discover the power of Astilectron through a demo app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Titlebar

roociferSonOfTheMorning opened this issue · comments

I am looking for some guidance for a custom titlebar.
Something similar to custom-electron-titlebar but simpler.
I am specifically looking for drag, min, max and close.

I've seen a few tickets within your astilectron projects the make me think other people are doing something like this.

Could you provide some guidance on how I would build this or maybe you know of someone who has a public project with this implemented?

Thank you for your time!

I don't see how you can add this directly in electron. However, if I were you, I would implement it in HTML/JS/CSS since in JS you have access to nodeJS functions and the window object

I am wanting to implement in html/js/css, I am a little confused as how to get started.

if I were to follow a tutorial like this:
https://github.com/binaryfunt/electron-seamless-titlebar-tutorial

How would I go about controlling the window in step 8 using the astilectron object in js?

should I send a message and handle it in the MessageHandler where I have access to the window or is there a way of manipulating the window in javascript?

Right now you can use the code in step 8 since you still have access to the remote attribute. However, this attribute is deprecated and will be removed in next Electron versions.

Therefore, if I were you, I'd do it the way you've described in your last comment : send a message to GO and let it do the proper action on the window.

Thank you very much for your help, I've got it working this morning!