Naezr / ShyFox

A very shy little theme that hides the entire browser interface in the window border
Mozilla Public License 2.0
1.71k stars 31 forks source link

[Request] Ability to add a short delay before the toolbar/sidebar hides (mostly sidebar) #97

Open nirurin opened 4 months ago

nirurin commented 4 months ago

I'm sure it's a personal preference, but I would like it if I could add a short delay when I move the mouse off a toolbar, before it auto-hides. Gives me some leeway in case the mouse slips from the bar slightly, where it doesnt just jump closed and I have to chase after it.

I know altering the delay time would be pretty easy (it's just a timer in ms as far as I remember) but I don't know how to add the delay code to an existing animation... hopefully someone can help!

Naezr commented 4 months ago

Right now I'm using the same simple animation for everything. And it works, all elements move the same way relative to each other.

I remember I tried adding a delay to the sidebar animation. But it was applied like this: hover over the panel, wait for the delay, the panel slides out, move the cursor away, wait for the delay, the panel slides in.

I would like there to be no delay between hovering over the indicator and the appearance of the panel. I don't know how to add a delay only to the second half of the animation.

nirurin commented 4 months ago

I agree, I would prefer not to have the delay on the appearance animation. I would only want it on the "slide out" animation.

I'd be interested in tinkering with it if you don't have the time, if you could let me know the line of code you use (and where) to add a delay to both the in and out animations. I can play around and see if I can find how to make it more specific.

Naezr commented 4 months ago

https://github.com/Naezr/ShyFox/commit/668324819e2e9cdb4b174f53c43e1882bb935e63

The delay is set to one second for testing purposes. Also, I haven't figured out what to do with border yet. The idea is to set transition with delay for hidden state and standard transition for visible state

nirurin commented 4 months ago

Ok so, if the window is already set to 'hide sidebar' then the animations seem to work fine. Hovering over the marker make it appear quickly, and moving the pointer away has a delay before the window closes.

However it does have the odd side effect, of if sidebar is not set to auto-hide, and you press the shortcut to change it to auto-hide, the address bar section changes straight away but the sidebar doesnt (it's using the same delay). Which isn't ideal.

However it -does- work, I guess there just needs to be a way of making it only work when it's already on auto-hide.

Hope this made sense haha. You probably already knew this behaviour but thought I'd mention it in case it's different for you.

Naezr commented 4 months ago

Either way it requires a lot of tweaking. I just experimented with it to see if it could be done.

nirurin commented 4 months ago

Either way it requires a lot of tweaking. I just experimented with it to see if it could be done.

I do think the delay is better, I would probably have it on all the hiding panels (especially the address bar, as it's so narrow the mouse can slip off it easily).

Naezr commented 4 months ago

Right now, it's still very buggy. Toggling the panel to autohide mode looks crooked. When I figure out how to make it look nice, it will be easy to apply the same to the other panels.

nirurin commented 4 months ago

If there's anything I can do to help please let me know. Great work :)

On Sat, 20 Jul 2024, 04:17 Naѣzr, @.***> wrote:

Right now, it's still very buggy. Toggling the panel to autohide mode looks crooked. When I figure out how to make it look nice, it will be easy to apply the same to the other panels.

— Reply to this email directly, view it on GitHub https://github.com/Naezr/ShyFox/issues/97#issuecomment-2240890837, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4T22OZHAUL5DZQILJAHPLZNHJEXAVCNFSM6AAAAABLDQBDMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBQHA4TAOBTG4 . You are receiving this because you authored the thread.Message ID: @.***>

Naezr commented 4 months ago

Right now I'm using a very simple css parameter transition. There is another parameter, animation. But it is complicated and I don't understand anything. It is possible that animation is can do everything correctly, but I don't understand how. So the idea of delay is put off until I figure it out. Or until someone else figures it out and shows me

nirurin commented 4 months ago

Ahh that's a shame. I will keep looking into it and see if I find an answer somewhere.

On Sat, 20 Jul 2024, 13:30 Naѣzr, @.***> wrote:

Right now I'm using a very simple css parameter transition. There is another parameter, animation. But it is complicated and I don't understand anything. It is possible that animation is can do everything correctly, but I don't understand how. So the idea of delay is put off until I figure it out. Or until someone else figures it out and shows me

— Reply to this email directly, view it on GitHub https://github.com/Naezr/ShyFox/issues/97#issuecomment-2241137219, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4T22JYGLHAAWSADGHYGPLZNJJ7ZAVCNFSM6AAAAABLDQBDMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRGEZTOMRRHE . You are receiving this because you authored the thread.Message ID: @.***>