lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
7.39k stars 715 forks source link

[Feature Request] Touchscreen support #1450

Open nikleonard opened 3 weeks ago

nikleonard commented 3 weeks ago

With the upgrade to Gradio v4, touchscreen-only workflows have become quite challenging because the context menu of the canvas control appears 'on hover', causing it to appear and disappear when one interacts with the interface.

Is there a way to change this hover behavior in the configuration, or at least make an option available to revert to a behavior more like the previous version? I use Forge on my iPad and can upload images using a quick double-tap just slightly right from the top-left corner of the canvas. However, this method is tricky and if missed, it opens the full-screen canvas which is difficult to close.

For me, being able to use Forge on an iPad is a significant advantage over other node-based UIs (like ComfyUI) that are impossible or difficult to use from anything but a computer.

DenOfEquity commented 3 weeks ago

Here's a way to force the toolbar visible at all times. You'll need to make some small edits to {forge install directory}\webui\modules_forge\forge_canvas\canvas.css

You can also make the icons larger by editing line 67 (font-size).

Backup the original first, just in case. And you'll have to fully restart the Forge server. I'm curious if this also fixes #881, where it looks as though drawing might be stopped by the toolbar fading in and perhaps stealing focus. [A more strictly proper fix would require a filthy hackedit of the minified/obfuscated javascript which controls the canvas (I did that first, before remembering that !important is a thing in CSS, but that is more complicated and turns out to be unnecessary).]

lunar-studio commented 2 weeks ago

I also use my ipad to connect to this remotely when I’m not in my server room. One option I’ve used in the past is to not use Safari—I think Chrome might have worked for at least for vanilla A1111. Currently, img2img upload is broken with Forge on the iPad Safari. It would be awesome if there could be a more permanent fix for this instead of editing lines of code. Granted, it’s a pretty easy fix @DenOfEquity has provided so thank you for that.