Hi with left mouse click on zoom button -> screen get bigger and screen slides down - so when leaves the viewport it needs a scroll up so center remains and zoom is userfull with right mouse click on zoom button -> screen get smaller and screen slides down - so when viewport is off the physical screena scroll down - do nothing when viewport is <= the physical screen ---
On Fri, 12 Jul 2024 12:04:30 -0600 pastebin@gmx.com wrote:
Hi
with left mouse click on zoom button -> screen get bigger and screen slides down - so when leaves the viewport it needs a scroll up so center remains and zoom is userfull
with right mouse click on zoom button -> screen get smaller and screen slides down - so when viewport is off the physical screena scroll down - do nothing when viewport is <= the physical screen
Thats true. I think the zoom code right now just relies on a StyleEngine action, which isn't really designed for that. What you are suggesting would probably take quite a bit more work. Dillo needs contributors who can offer patches and support. Please lets try to pick our battles carefully in order to not overwhelm the already very busy developer. -Alex
isn't there already a scroll up/scroll down command like zoom_in/zoom_out } else if (cmd == KEYS_ZOOM_IN) { a_UIcmd_zoom_in(a_UIcmd_get_bw_by_widget(this)); a_UIcmc_scroll_up(number_lines); <-- ret = 1; On Fri, 12 Jul 2024 23:18:11 +0200 <a1ex@dismail.de> wrote:
On Fri, 12 Jul 2024 12:04:30 -0600 pastebin@gmx.com wrote:
Hi
with left mouse click on zoom button -> screen get bigger and screen slides down - so when leaves the viewport it needs a scroll up so center remains and zoom is userfull
with right mouse click on zoom button -> screen get smaller and screen slides down - so when viewport is off the physical screena scroll down - do nothing when viewport is <= the physical screen
Thats true. I think the zoom code right now just relies on a StyleEngine action, which isn't really designed for that. What you are suggesting would probably take quite a bit more work.
Dillo needs contributors who can offer patches and support. Please lets try to pick our battles carefully in order to not overwhelm the already very busy developer.
-Alex
_______________________________________________ Dillo-dev mailing list -- dillo-dev@mailman3.com To unsubscribe send an email to dillo-dev-leave@mailman3.com
Hi, On Fri, Jul 12, 2024 at 11:18:11PM +0200, a1ex@dismail.de wrote:
On Fri, 12 Jul 2024 12:04:30 -0600 pastebin@gmx.com wrote:
Hi
with left mouse click on zoom button -> screen get bigger and screen slides down - so when leaves the viewport it needs a scroll up so center remains and zoom is userfull
with right mouse click on zoom button -> screen get smaller and screen slides down - so when viewport is off the physical screena scroll down - do nothing when viewport is <= the physical screen
Thats true. I think the zoom code right now just relies on a StyleEngine action, which isn't really designed for that. What you are suggesting would probably take quite a bit more work.
I think we could approximate it by assuming that each element will be magnified by the same amount. Therefore, if you measure the distance in pixels of the current view from the top of the page, Y, and then you increase the zoom by a factor of 1.2, then you should scroll to 1.2*Y to compensate it. Here is a "graphical" visualization but in horizontal rather than vertically: 0 5 10 15 0 5 10 15 AAAABBBBCCCCDDDD --> AAAAABBBBBCCCCCDDDDD ^ ^ Y=10 x1.2 Y=12 This won't work with cases where the text is constrained into a container that has 100% width (or some other relative size), as it would change the breaking point of the lines, causing the scroll approximation to fail. A more accurate and complex approach is to take the position of some elements in the current view, and then try to locate them after zooming and then scroll there. I opened an issue here to track it: https://github.com/dillo-browser/dillo/issues/221 Rodrigo.
participants (3)
-
a1ex@dismail.de
-
pastebin@gmx.com
-
Rodrigo Arias