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

Make command bar draggable #64

Open
mr-islam opened this issue Feb 6, 2021 · 4 comments
Open

Make command bar draggable #64

mr-islam opened this issue Feb 6, 2021 · 4 comments
Labels
design / ux enhancement Improving functions of an existing feature

Comments

@mr-islam
Copy link
Collaborator

mr-islam commented Feb 6, 2021

Add a small :: to the right and make the thing draggable

Not sure how this would work technically, but would be awesome

@mr-islam mr-islam added design / ux enhancement Improving functions of an existing feature labels Feb 17, 2021
@axon4
Copy link
Contributor

axon4 commented Apr 9, 2021

It looks like making elements draggable may simply require adding '-webkit-app-region: drag' to the class.

https://www.electronjs.org/docs/api/frameless-window#draggable-region
https://www.codegrepper.com/code-examples/html/electron+draggable

@mr-islam
Copy link
Collaborator Author

mr-islam commented Apr 9, 2021

Oh wow, that's a great find @yusufabukar ! Jazakumullahu khayran 💐

So we can just make the entire toolbar draggable, and mark every element inside undraggable except the :: symbol one one side.

(But this might make it draggable by empty space on the bar... is that a problem? We can test)

We can use the same technique for the page image elements too... 🤔💡

@axon4
Copy link
Contributor

axon4 commented Apr 10, 2021

Perhaps making the background a child div (or svg) element within the main container would mitigate the empty space issue? Since the background element would have the no-drag attribute.

Something along the lines of:

div class='container -webkit-app-region: drag'
div class='background'
...
/div
/div

.container * {
-webkit-app-region: no-drag
}

@mr-islam
Copy link
Collaborator Author

That is excellent, sounds like exactly what we want 💯

If you'd like to make a PR for this it would be amazing brother @yusufabukar

Or if you're busy, I'll try and do this in the future inshaAllah, though maybe not this month since I'm trying to finish i18n for Layl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design / ux enhancement Improving functions of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants