Bug 969376 - correctly size Australis' menu button, make it hug right border on Windows and Linux, r=jaws

--HG--
rename : browser/base/content/test/general/browser_backButtonFitts.js => browser/base/content/test/general/browser_menuButtonFitts.js
This commit is contained in:
Gijs Kruitbosch 2014-02-11 19:31:43 +00:00
parent 5259bcbfed
commit e286c53fff
6 changed files with 50 additions and 4 deletions

View File

@ -269,6 +269,8 @@ skip-if = true # browser_drag.js is disabled, as it needs to be updated for the
[browser_locationBarCommand.js]
skip-if = os == "linux" # Intermittent failures, bug 917535
[browser_locationBarExternalLoad.js]
[browser_menuButtonFitts.js]
skip-if = os != "win" # The Fitts Law menu button is only supported on Windows (bug 969376)
[browser_middleMouse_inherit.js]
[browser_minimize.js]
[browser_mixedcontent_securityflags.js]

View File

@ -0,0 +1,32 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
function test () {
waitForExplicitFinish();
window.maximize();
// Find where the nav-bar is vertically.
var navBar = document.getElementById("nav-bar");
var boundingRect = navBar.getBoundingClientRect();
var yPixel = boundingRect.top + Math.floor(boundingRect.height / 2);
var xPixel = boundingRect.width - 1; // Use the last pixel of the screen since it is maximized.
function onPopupHidden() {
PanelUI.panel.removeEventListener("popuphidden", onPopupHidden);
window.restore();
finish();
}
function onPopupShown() {
PanelUI.panel.removeEventListener("popupshown", onPopupShown);
ok(true, "Clicking at the far edge of the window opened the menu popup.");
PanelUI.panel.addEventListener("popuphidden", onPopupHidden);
PanelUI.hide();
}
registerCleanupFunction(function() {
PanelUI.panel.removeEventListener("popupshown", onPopupShown);
PanelUI.panel.removeEventListener("popuphidden", onPopupHidden);
});
PanelUI.panel.addEventListener("popupshown", onPopupShown);
EventUtils.synthesizeMouseAtPoint(xPixel, yPixel, {}, window);
}

View File

@ -591,6 +591,10 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
width: 32px;
}
#nav-bar #PanelUI-menu-button {
-moz-padding-start: 7px;
-moz-padding-end: 5px;
}
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover > .toolbarbutton-icon,
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([buttonover]):not([open]):hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,

View File

@ -507,6 +507,13 @@ toolbar .toolbarbutton-1:not([type="menu-button"]),
-moz-margin-start: 10px;
}
#nav-bar #PanelUI-menu-button {
margin-top: 0;
margin-bottom: 0;
-moz-margin-start: 9px;
-moz-margin-end: 7px;
}
@media not all and (min-resolution: 2dppx) {
%include ../shared/toolbarbuttons.inc.css
%include ../shared/menupanel.inc.css

View File

@ -26,10 +26,6 @@
background-repeat: no-repeat;
}
#PanelUI-menu-button {
margin: 0 7px 0 9px;
}
.panel-subviews {
padding: 4px;
background-color: hsla(0,0%,100%,.97);

View File

@ -496,6 +496,11 @@ menuitem.bookmark-item {
-moz-box-pack: center;
}
#nav-bar #PanelUI-menu-button {
-moz-padding-start: 7px;
-moz-padding-end: 5px;
}
#nav-bar .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button):not(#social-provider-button):not(#PanelUI-menu-button) {
padding-left: 5px;
padding-right: 5px;