sailfishos / sailfish-browser

Sailfish Browser
https://github.com/sailfishos/sailfish-browser/wiki/Sailfish-Browser-wiki
Mozilla Public License 2.0
305 stars 86 forks source link

[sailfish-browser] Use a press and hold scheme in tab list to switch … #959

Open dcaliste opened 2 years ago

dcaliste commented 2 years ago

…to close mode.

Coming from a discussion in the forum (https://forum.sailfishos.org/t/browser-redesign-in-sailfish-4-2-feedback-thread/7867/78 and later posts), it was proposed to use a press and hold behaviour to activate a close tab mode in the tab list view. Like in the home screen (Lipstick switcher).

I've investigated the possibility and created a PR to test the idea. It's using the same metrics (animation duration, scaling factor...) than in the Lipstick switcher.

Here is a screen shot : close

Entering this mode would allow later to implement a tab reordering capability, like in the Lipstick switcher.

@rainemak or @jpetrell , what do you think ?

PS : @rainemak , I've removed the timer in TabItem.qml that you added in 2014 commit bab080154 when the tabs were using shader effects and textures. I think it's safe to remove it now that we're using images. Do you agree ?

dcaliste commented 2 years ago

Thank you @rainemak for your review and suggestions. I've updated the PR accordingly.

I'm a bit wondering though : do you prefer to have this code to TabItem.qml ? If so, I can do, no problem.

rainemak commented 2 years ago

I guess rebase went wrong, maybe you rebased from master instead of next.

dcaliste commented 2 years ago

Oops, stupid me. Corrected, now based on next, and not anymore 55 commit to push ;-)

dcaliste commented 2 years ago

It's now rebased with all remarks addressed (if I didn't missed any) and the close icon back on TabItem.