Bug 918225 - Right-click drop down options are offset r=mbrubeck,jimm

This commit is contained in:
Rodrigo Silveira 2013-10-22 17:30:19 -07:00
parent 396493be0f
commit 6ee573a873
4 changed files with 2 additions and 43 deletions

View File

@ -378,13 +378,6 @@ MenuPopup.prototype = {
let screenWidth = ContentAreaObserver.width;
let screenHeight = ContentAreaObserver.height;
// Add padding on the side of the menu per the user's hand preference
let leftHand =
Services.metro.handPreference == Ci.nsIWinMetroUtils.handPreferenceLeft;
if (aSource && aSource == Ci.nsIDOMMouseEvent.MOZ_SOURCE_TOUCH) {
this.commands.setAttribute("left-hand", leftHand);
}
if (aPositionOptions.rightAligned)
aX -= width;

View File

@ -207,11 +207,7 @@ menulist {
color: white;
}
.menu-popup > richlistbox[left-hand="true"] > richlistitem {
padding-left: 50px;
}
.menu-popup > richlistbox[left-hand="false"] > richlistitem {
.menu-popup > richlistbox > richlistitem {
padding-right: 50px;
}

View File

@ -12,24 +12,15 @@
* implementation of this interface for non-Windows systems, for testing and
* development purposes only.
*/
[scriptable, uuid(25524bde-8b30-4b49-8d67-7070c790aada)]
[scriptable, uuid(496b4450-5757-40f7-aeb9-a958ae86dbd1)]
interface nsIWinMetroUtils : nsISupports
{
/* return constants for the handPreference property */
const long handPreferenceLeft = 0;
const long handPreferenceRight = 1;
/**
* Determine if the current browser is running in the metro immersive
* environment.
*/
readonly attribute boolean immersive;
/**
* Determine if the user prefers left handed or right handed input.
*/
readonly attribute long handPreference;
/**
* Determine the activation URI
*/

View File

@ -384,27 +384,6 @@ nsWinMetroUtils::GetImmersive(bool *aImersive)
return NS_OK;
}
NS_IMETHODIMP
nsWinMetroUtils::GetHandPreference(int32_t *aHandPreference)
{
if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) {
*aHandPreference = nsIWinMetroUtils::handPreferenceRight;
return NS_OK;
}
ComPtr<IUISettings> uiSettings;
AssertRetHRESULT(ActivateGenericInstance(RuntimeClass_Windows_UI_ViewManagement_UISettings, uiSettings), NS_ERROR_UNEXPECTED);
HandPreference value;
uiSettings->get_HandPreference(&value);
if (value == HandPreference::HandPreference_LeftHanded)
*aHandPreference = nsIWinMetroUtils::handPreferenceLeft;
else
*aHandPreference = nsIWinMetroUtils::handPreferenceRight;
return NS_OK;
}
NS_IMETHODIMP
nsWinMetroUtils::GetActivationURI(nsAString &aActivationURI)
{