Opened 14 years ago

Closed 14 years ago

#7778 closed patch (fixed)

Up and down scrolling directions are reversed in MythGallery

Reported by: Clayton Smith <argilo@…> Owned by: beirdo
Priority: minor Milestone: 0.24
Component: Plugin - MythGallery Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

According to mythplugins/mythgallery/README, the 2 key should scroll up and the 8 key should scroll down, but these are actually reversed, making scrolling using a remote control very unintuitive.

To see the problem, open a photo in MythGallery, then press 9 a few times to zoom in. Pressing 2 will scroll down while 8 will scroll up.

I've attached a patch which corrects this problem.

Attachments (1)

mythgallery-up-down.patch (1.6 KB) - added by Clayton Smith <argilo@…> 14 years ago.
Reverse up & down scrolling in MythGallery

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by Clayton Smith <argilo@…>

Attachment: mythgallery-up-down.patch added

Reverse up & down scrolling in MythGallery

comment:1 Changed 14 years ago by sphery

The scrolling seems to work as designed (and as originally implemented in [1735] ). The bindings used are "SCROLLUP" (with help text, "Scroll image up," and default binding of 2) and "SCROLLDOWN" (with help text, "Scroll image down," and default binding of 8). When you use the SCROLLUP binding (2), the /image/ is moved up while the viewport remains fixed, so you see a portion of the image lower than the portion you were seeing. Similarly, when you use the SCROLLDOWN binding (8), the image is moved down while the viewport remains fixed, so you see a portion of the image higher than the portion you were seeing.

It seems to have been designed to work intuitively as the numbers are arranged on a numeric keypad--where most keypads have a down arrow on 2 (which is SCROLLUP/moves the image up so you see a lower part of the image) and an up arrow on 8 (which is SCROLLDOWN/moves the image down so you see a higher part of the image). Whether we should now (after how many versions?) change SCROLLUP and SCROLLDOWN to work as the numbers are arranged on a remote control or leave it as it is so that it works as the numbers are arranged on a numeric keypad, I'll leave up to someone else.

My preference, however, would be to completely get rid of the SCROLLUP, SCROLLDOWN, SCROLLLEFT, and SCROLLRIGHT bindings used /only/ by MythGallery and change the plugin to use the global UP, DOWN, LEFT, and RIGHT bindings used everywhere else in Myth--where UP would scroll the viewport up (so you see a higher portion of the picture) and DOWN would scroll the viewport down (so you see a lower portion of the picture). Using the global directional keybindings works well for *both* keyboards and remotes (and would work fine for a remote without arrows if the user overrides the global bindings for the directional keys in the Gallery context to use numbers as now). I have a patch in the works that would allow users to add a new keybinding to a context using MythControls?--effectively allowing users to override bindings in lower contexts with the GUI keybinding editor instead of direct DB editing.

I'd be happy to make such a patch (and the required DB update). If we take the approach of using the global bindings, I recommend that we leave the SCROLLUP/SCROLLDOWN default bindings as they are in 0.22-fixes, and users who want to "flip" them for easy remote use should simply remap them in MythControls?. Then, when they upgrade to 0.23 (or trunk after the change to the global bindings), they'll simply switch to using the global directional bindings.

comment:2 in reply to:  1 Changed 14 years ago by Clayton Smith <argilo@…>

Replying to mdean:

The scrolling seems to work as designed (and as originally implemented in [1735] ). The bindings used are "SCROLLUP" (with help text, "Scroll image up," and default binding of 2) and "SCROLLDOWN" (with help text, "Scroll image down," and default binding of 8). When you use the SCROLLUP binding (2), the /image/ is moved up while the viewport remains fixed, so you see a portion of the image lower than the portion you were seeing. Similarly, when you use the SCROLLDOWN binding (8), the image is moved down while the viewport remains fixed, so you see a portion of the image higher than the portion you were seeing.

If that's the case, then why doesn't SCROLLLEFT move the image left and SCROLLRight move the image right? They both move the viewport, as one would expect.

My preference, however, would be to completely get rid of the SCROLLUP, SCROLLDOWN, SCROLLLEFT, and SCROLLRIGHT bindings used /only/ by MythGallery and change the plugin to use the global UP, DOWN, LEFT, and RIGHT bindings used everywhere else in Myth--where UP would scroll the viewport up (so you see a higher portion of the picture) and DOWN would scroll the viewport down (so you see a lower portion of the picture). Using the global directional keybindings works well for *both* keyboards and remotes (and would work fine for a remote without arrows if the user overrides the global bindings for the directional keys in the Gallery context to use numbers as now). I have a patch in the works that would allow users to add a new keybinding to a context using MythControls?--effectively allowing users to override bindings in lower contexts with the GUI keybinding editor instead of direct DB editing.

UP/LEFT are already used to move to the previous image, and DOWN/RIGHT move to the next image. Are you proposing changing the behaviour so that these keys behave differently during zooming, and not using the numeric keypad any more for scrolling?

comment:3 Changed 14 years ago by beirdo

Owner: changed from Isaac Richards to beirdo
Status: newassigned

comment:4 Changed 14 years ago by beirdo

Milestone: unknown0.24
Status: assignedaccepted

comment:5 Changed 14 years ago by beirdo

Severity: mediumlow

Although this is potentially going to confuse a few users at first, the patch does make the panning when zoomed be more consistent.

comment:6 Changed 14 years ago by beirdo

Resolution: fixed
Status: acceptedclosed

(In [25662]) Swaps up and down scrolling (2 and 8 keys by default) as the original behavior was not consistent with the left/right scrolling.

Patch from Clayton Smith <argilo@…> Closes #7778

Note: See TracTickets for help on using tickets.