elanthia-online / illthorn

Electron-based FE
18 stars 10 forks source link

Window Draggability #35

Closed chriscoyier closed 4 years ago

chriscoyier commented 4 years ago

It's hard to find a spot to grab the window to drag it around. For me I have to find a spot in between the buttons to do it at all.

Screen Shot 2020-07-03 at 12 22 31 PM
chriscoyier commented 4 years ago

Quirk: if the window ISN'T active, it's easier to click in that area and grab it, but once it's active it's harder.

BryanSchuetz commented 4 years ago

I noticed this as well. There's a webkit property for making frameless windows draggable, I just added it to #app in my user.css and it makes the window super draggable:

#app{-webkit-app-region: drag;}

I could add it into app.css if we think this solves the problem reasonably.

EDIT: This does make it basically impossible to highlight things in the app window though—adding it to hands-wrapper or the sessions pane should suffice I'd think.

chriscoyier commented 4 years ago

It doesn't seem to do anything for me. Weird?

Maybe we could do a thin bar along the top? Or maybe not make the window frameless at all?

BryanSchuetz commented 4 years ago

That is weird, can see it working here: https://share.getcloudapp.com/lluJAbly

If we do keep it like this, I suppose we'll have to specify no-drag for the list items in #sessions—I'm assuming the idea is that you can click on the session blocks to switch the current session?

Also, not against just including a title bar either I suppose.

chriscoyier commented 4 years ago

Ah yes, working for me now, not sure what was happening before.

I think...

#sessions {
  -webkit-app-region: drag;
}
#sessions ol li {
   -webkit-app-region: no-drag;
}

is a nice way to handle this.

ondreian commented 4 years ago

this seems closable