[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #18144 [Tor Browser]: about:tor update arrow position is wrong (Retina and zoom)



#18144: about:tor update arrow position is wrong (Retina and zoom)
-------------------------+--------------------------
 Reporter:  mcs          |          Owner:  tbb-team
     Type:  defect       |         Status:  new
 Priority:  Medium       |      Milestone:
Component:  Tor Browser  |        Version:
 Severity:  Normal       |     Resolution:
 Keywords:               |  Actual Points:
Parent ID:               |         Points:
  Sponsor:               |
-------------------------+--------------------------

Comment (by mcs):

 Because window.devicePixelRatio always returns 1.0, we need to find
 another way to determine the correct ratio.

 Kathy and I discovered that accounting for the device pixel ratio is not
 too difficult (e.g., if a retina Mac Book Pro is in use) since the that
 ratio is the same for the chrome area that contains the Torbutton toolbar
 item and the page itself (e.g., 2.0). However, it is much more difficult
 to precisely account for the zoom level (Ctrl/Cmd+/-). We thought we could
 just use a call like this to get the correct factor:
  let zoomFactor = ZoomManager.getZoomForBrowser(gBrowser);
 But the actual ratio that is used for layout is slightly different, which
 causes the about:tor arrow to not quite be centered below the Torbutton
 toolbar item at some zoom levels. This is not very noticeable when the
 toolbar item is in its default position near the left side of the window,
 and since the APIs to retrieve the correct value appear to be only
 accessible from C++ we we may just have to live with this small annoyance.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18144#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs