Closed OrangeDrangon closed 2 years ago
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
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?
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.
k
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.
main-stack includes all of it
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
document.getElementsByTagName('mw-app')[0].parentNode.prepend(document.createElement('div'))
Makes sense. I'll push a new commit up for testing later.
Currently the titlebar will always be injected. Potentially only want to do it on mac.
Tested and it works
Can you confirm it still works otherwise I will need to revert that commit and make sure the bar doesnt interfere on other platforms.
Confirmed still working with latest from this PR
Does the size feel correct? As in do you find it obvious where you can drag even though the bar is invisible?
Ya, there is plenty of space to grab it. Sure we could refine it but I would be happy with this.
Good enough for me
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.