Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove titlebar on macos #374

Merged
merged 3 commits into from
Apr 22, 2022
Merged

Remove titlebar on macos #374

merged 3 commits into from
Apr 22, 2022

Conversation

OrangeDrangon
Copy link
Owner

The current change just removes the frame. It does not mark any draggable regions. If the frame is gone and you cannot move the window we can work towards marking a good location as draggable.

@OrangeDrangon OrangeDrangon linked an issue Apr 11, 2022 that may be closed by this pull request
@myspivey
Copy link

This does indeed make the window not draggable. The fix can be found in adjusting the style sheet. This is the code that made it work from the previous version. https://github.com/chrisknepper/android-messages-desktop/blob/b3abdcddc288e7aace0be452713a4949f1c8348f/src/stylesheets/main.css#L51

@OrangeDrangon
Copy link
Owner Author

Since we now load the website directly we need to pick part of the page that is always available. Or maybe we can inject a bar?

@myspivey
Copy link

Ya, without a custom header there is not a great way to inject a draggable area. Looking at the divs existing are we could latch onto this is the best, and that has other interactive elements in it so not great as a draggable area. So I think the only way really is injecting a small draggable bar that knocks the screen down a bit.
Screen Shot 2022-04-21 at 4 10 09 PM
k

@OrangeDrangon
Copy link
Owner Author

Does the dom have a app-root (I assume this is an angular app) that we can slide next too. I wouldn't want to interfere with the apps dom. Might cause unexpected issues.

@myspivey
Copy link

myspivey commented Apr 21, 2022

Screen Shot 2022-04-21 at 4 18 32 PM

main-stack includes all of it

@myspivey
Copy link

Just doing a quick hack of things this worked easy for a bar, and the bar states when moving around. If you inject it below this, it will get wiped out on any changing of visible message because of router-outlet

image
image
document.getElementsByTagName('mw-app')[0].parentNode.prepend(document.createElement('div'))

@OrangeDrangon
Copy link
Owner Author

Makes sense. I'll push a new commit up for testing later.

@OrangeDrangon
Copy link
Owner Author

Currently the titlebar will always be injected. Potentially only want to do it on mac.

@myspivey
Copy link

Tested and it works

@OrangeDrangon
Copy link
Owner Author

Can you confirm it still works otherwise I will need to revert that commit and make sure the bar doesnt interfere on other platforms.

@myspivey
Copy link

Confirmed still working with latest from this PR

@OrangeDrangon
Copy link
Owner Author

Does the size feel correct? As in do you find it obvious where you can drag even though the bar is invisible?

@myspivey
Copy link

Ya, there is plenty of space to grab it. Sure we could refine it but I would be happy with this.

@OrangeDrangon
Copy link
Owner Author

Good enough for me

@OrangeDrangon OrangeDrangon merged commit eaccb7b into master Apr 22, 2022
@OrangeDrangon OrangeDrangon deleted the mac-titlebar branch April 22, 2022 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request to remove the "Messages for Web" title bar
2 participants