Skip to content
This repository was archived by the owner on Aug 10, 2024. It is now read-only.

Titlebar #63

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

ToxicKwas1221
Copy link

I noticed that on Windows the titlebar looks default and not like the one in the official discord client. I am trying to make it look just like the one in the official client, but the problem is that discord becomes corrupted and I am not sure how to fix that. I think it might have to do something with the fact that I changed the webPreferences of the BrowserWindow(especially the contextIsolation) for integrating the custom-electron-titlebar library. I tried loading it in a preload script with contextIsolation: true using contextBridge, but it always failed to load the script. Also after searching through the official discord client HTML, I found the svg path of the logo that is on the top left corner and tried to implement that, but it appeared under the titlebar. I tried using z-index property, but it didn't help.

@ToxicKwas1221
Copy link
Author

do you have any ideas on how to fix it?

@xNaCly xNaCly added the enhancement New feature or request label Aug 17, 2020
@TristonStuart
Copy link

Never really made an electron application but from what I understand there may be a more native approach. https://ourcodeworld.com/articles/read/938/how-to-create-a-custom-titlebar-inspired-on-visual-studio-code-title-bar-in-electron-framework

@ToxicKwas1221
Copy link
Author

@TristonStuart I already fixed the discord corruption and the preload script. Everything works except that the login screen is not patched for some unspecific reason as there is no error message or anything. Even though there is a "patch login screen" message in the console log, which most certainly comes from the patches Flam3rboy made in index.html . However, the login screen is default and I'm not sure how to fix that.

Copy link

@trentwiles trentwiles left a comment

Choose a reason for hiding this comment

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

Looks neat!

@ToxicKwas1221
Copy link
Author

Never mind, the styles work on Windows as well.

@kezvon
Copy link

kezvon commented Sep 4, 2020

Is there a version for Mac?

@ToxicKwas1221
Copy link
Author

@kezvon Mac version doesn't require a titlebar.

@SamuelScheit
Copy link
Owner

Did you fixed the login screen bug @ToxicKwas1221 and at least the dev tools + view (reload) is required in the titlebar.

@ToxicKwas1221
Copy link
Author

@Flam3rboy Yes, I did fix the login screen bug. I initially planned the titlebar to look just like the discord's one without anything on it, but if you want dev tools and view with reload button to be there, I could find a way to implement that.

@ToxicKwas1221
Copy link
Author

@Flam3rboy it's done.

@Preloading
Copy link

Rip
A pull never to be merged i think

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks very good!

@aramodi
Copy link

aramodi commented Dec 25, 2020

Flam3rboy said this PR has no reload and devtools button

@ToxicKwas1221
Copy link
Author

@Arashmm I added those in my last commit. The reload and devtools buttons are under the View button. Although they are provided by the library I used, so I don't assume it's customizable to the point, where I could make them separate.

@SamuelScheit SamuelScheit added the bug Something isn't working label Apr 3, 2021
@ghost
Copy link

ghost commented Jun 6, 2021

Is this still being worked on?

@ToxicKwas1221
Copy link
Author

@shayshon It's done. Even overdone.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.