discord-bot-client icon indicating copy to clipboard operation
discord-bot-client copied to clipboard

Titlebar

Open ToxicKwas1221 opened this issue 4 years ago • 14 comments

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 avatar Aug 16 '20 13:08 ToxicKwas1221

do you have any ideas on how to fix it?

ToxicKwas1221 avatar Aug 16 '20 15:08 ToxicKwas1221

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

TristonStuart avatar Aug 21 '20 03:08 TristonStuart

@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.

ToxicKwas1221 avatar Aug 21 '20 22:08 ToxicKwas1221

Never mind, the styles work on Windows as well.

ToxicKwas1221 avatar Aug 26 '20 00:08 ToxicKwas1221

Is there a version for Mac?

kezvon avatar Sep 04 '20 03:09 kezvon

@kezvon Mac version doesn't require a titlebar.

ToxicKwas1221 avatar Sep 04 '20 17:09 ToxicKwas1221

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

SamuelScheit avatar Sep 15 '20 16:09 SamuelScheit

@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 avatar Sep 15 '20 20:09 ToxicKwas1221

@Flam3rboy it's done.

ToxicKwas1221 avatar Sep 23 '20 22:09 ToxicKwas1221

Rip A pull never to be merged i think

Preloading avatar Sep 24 '20 15:09 Preloading

Flam3rboy said this PR has no reload and devtools button

aramodi avatar Dec 25 '20 14:12 aramodi

@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.

ToxicKwas1221 avatar Dec 26 '20 01:12 ToxicKwas1221

Is this still being worked on?

ghost avatar Jun 06 '21 22:06 ghost

@Shayshon It's done. Even overdone.

ToxicKwas1221 avatar Jun 07 '21 15:06 ToxicKwas1221