AlexTorresDev / custom-electron-titlebar

Custom electon title bar inpire on VS Code title bar
MIT License
868 stars 149 forks source link

Title moves to the left after resizing #246

Closed waterfallwhitebread closed 10 months ago

waterfallwhitebread commented 1 year ago

Problem Description

When resizing (i.e. make the window smaller) the electron app the title inside the titlebar is moving to the left. When I make the window bigger again it still sticks to the left.

Steps to Reproduce

  1. Resize the electron window

Expected Behavior

The title should always stay in center when defined so in TitlebarOptions

Current Behavior

The title moves to the left

Additional Information

OS: Windows 10

lvcabral commented 12 months ago

I was about to open the same issue, here a GIF with the problem happening on my app: electron_Wm82DNSKuR

lvcabral commented 11 months ago

The issue was introduced by this commit that removed comments from the debug code that was there. The good practice is never to keep commented code, because this could always happen!

lvcabral commented 11 months ago

With that code commented the issue of moving left stops but now the title goes over the Menu when the window get small. I think this code needs a major review. image

lvcabral commented 10 months ago

It's fixed in the latest release, thanks! You can close this ticket

waterfallwhitebread commented 10 months ago

Can confirm it's working! Thanks a lot!!