Skip to content

Instantly share code, notes, and snippets.

@nyanpasu64
Last active August 18, 2016 07:27
Show Gist options
  • Save nyanpasu64/8a9a8001fe5ff6fb47e8f4e97331936a to your computer and use it in GitHub Desktop.
Save nyanpasu64/8a9a8001fe5ff6fb47e8f4e97331936a to your computer and use it in GitHub Desktop.
Python Zoom Calculator
#!/usr/bin/env python3
from numpy import array, vectorize as V
def A(*args):
return array(args)
N=8
Z=N*1
a = array(range(-Z, Z+1)) / N
a = 2**a
a *= 100
a = a.round().astype(int)
a = V(str)(a)
a = '-'.join(a)
print(a)

An email to Zoom Page developer

Do you have a Github/etc. repository or issue tracker?

I'm using the Zoom Page Firefox extension. While useful (per-page zoom text is found in other extensions, custom zoom levels is exclusive to this), it seems to affect how zooming behaves overall.

Small images zoomed to 300%

Normally Firefox only shrinks images to fit the page. This extension causes Firefox to blow up images up to 300% to fill the page. I think the default, which preserves pixel-perfect patterns and keeps images sharp, is a better choice.

So I have to change Zoom Levels -> Image Fit-To-Window Zoom Levels -> Maximum to 100%, but leave Minimum at [1]. Otherwise, large images cannot be shrunk to fit in page. (Confusion++)

Can't toggle image zoom before fully loaded

I think the current categorization is confusing. In an attempt to prevent images from zooming in to fill the screen (correct way above), I mistakenly General -> Image Zoom Mode to "Default". Now large images aren't shrunk down.

This is exacerbated by a bug: When an image is currently loading, clicking fails to toggle between fit-screen and default (pixel) display.

Confusing Categories

Right now, text vs. image controls are scattered across different tabs. Text zoom is spread across General and Zoom Levels. Image behavior is spread across General, Zoom Levels, and Image Zoom. This scatter of information makes it hard for me to make Zoom Page act like default Firefox behavior, as well as make changes.

Also I think the Edit Custom Zoom Levels interface is confusing.

  • "Copy" should be "revert", "cancel", or "undo".
  • "Validate" checkmark icon is confused with "save" or "OK". Maybe a question mark is more appropriate.
  • "Update" could be renamed "Save".

Firefox Default Behavior?

Your addon overrides several default Firefox behaviors. When I install the extension, I must attempt to revert some settings to Firefox default, making it more difficult to add specific customizations that function properly.

Small images zoomed by default (Image fit-to-window zoom levels = 300)

What do "text minimum zoom level", "fit-to-width zoom levels (minimum, maximum half, and maximum full) mean?

  • Reading the docs, it seems like they control fit-to-width behavior (and have no effect if FtW is disabled.)
  • Should the interface be designed to be understandable without documentation?

Fit-to-width is toggled under General, yet FtW configuration is on a separate tab. Maybe FtW configuration should be listed underneath the FtW toggle, on the same page?

  • Default Fit-to-Window Type
  • Maybe move fit-to-window to a separate tab, with text vs image sections?

Image fit-to-window zoom levels: What do the [1] [10] brackets mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment