ameboide / webcomic_reader

Webcomic Reader userscript at http://userscripts.org/scripts/show/59842
76 stars 68 forks source link

Horizontal scrollbar when using "shrink to fit width" #33

Open ghost opened 9 years ago

ghost commented 9 years ago

When using "shrink to fit width" resize option, image would not fit the window correctly, resulting in portion of image going out of bounds and horizontal scrollbar appearing below. This behavior is inconsistent and may change after resizing the window, seemingly at random. Bug is observed when using minimalistic layout with hidden script UI buttons. Making buttons visible fixes the image, no horizontal scrollbars appear even after resizing the window. kzb7xqt rfebn82

ameboide commented 9 years ago

I'm guessing that happens because of the vertical scrollbar. If the image is resized considering some space for the vertical scrollbar, everyting fits in the screen and no scrollbars appear, so then the image tries to use the entire width of the screen, but its increadsed height causes the extra content on the bottom to go off screen and the vertical scrollbar shows up, hiding part of the image. I'll try to fix it so that when this happens it keeps the smaller size and avoids the scrollbars.