Join GitHub today
[Feature] Electron drag window class #3494
Electron frameless windows doesn't have any window decoration. By default, you can't move them around in the window manager. Since there is now a QBar component in Quasar, some of the demos feature the layout of a title bar, close to the one of MacOS or Windows window decoration.
To make a component a draggable area for the window to move around, this is a simple CSS :
To get a quick demo of this :
And add to it the style above. It should be able to move on the QSpace component and the "title" (the span), depending of what selector may be appropriate in the :not part.
@nothingismagick (as asked by you)
This is really a nice and useful idea.
.q-bar -webkit-user-select none -webkit-app-region drag .q-bar > * -webkit-app-region no-drag
I'll create a prop for QBar specifically for this, but I need confirmation that it would work correctly first.
Took a bit more time to think this through. I think the best option is to simply have 2 classes that can be applied on any element. So not just on QBar.
I will also add some basic info for beginners on the event handlers for minimize, maximize/unmaximize and close buttons.