mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1084598 - [OS X 10.10 and later] fix focus styling for url bar and search box, r=mstange,gijs
MozReview-Commit-ID: 3aEs95lcpZb --HG-- extra : amend_source : 4f08292a48e1f47a8fa0e1a54d00d97c0a4e18e5
This commit is contained in:
parent
fbd4e8ea76
commit
ff19bfa581
@ -1510,6 +1510,13 @@ toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
box-shadow: @focusRingShadow@;
|
||||
}
|
||||
|
||||
@media (-moz-mac-yosemite-theme) {
|
||||
#urlbar[focused="true"],
|
||||
.searchbar-textbox[focused="true"] {
|
||||
box-shadow: @yosemiteFocusRingShadow@;
|
||||
}
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
-moz-box-align: center;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
%define loweredShadow 0 1px rgba(255, 255, 255, .4)
|
||||
%define focusRingShadow 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 1.5px 1px -moz-mac-focusring
|
||||
%define yosemiteFocusRingShadow 0 0 0 0.5px -moz-mac-focusring inset, 0 0 0 2px -moz-mac-focusring;
|
||||
|
||||
%define roundButtonBorder 1px solid rgba(0,0,0,.35)
|
||||
%define roundButtonBackground linear-gradient(#f6f6f6, #e9e9e9)
|
||||
|
@ -51,6 +51,15 @@ static nscolor GetColorFromNSColor(NSColor* aColor)
|
||||
(unsigned int)([deviceColor blueComponent] * 255.0));
|
||||
}
|
||||
|
||||
static nscolor GetColorFromNSColorWithAlpha(NSColor* aColor, float alpha)
|
||||
{
|
||||
NSColor* deviceColor = [aColor colorUsingColorSpaceName:NSDeviceRGBColorSpace];
|
||||
return NS_RGBA((unsigned int)([deviceColor redComponent] * 255.0),
|
||||
(unsigned int)([deviceColor greenComponent] * 255.0),
|
||||
(unsigned int)([deviceColor blueComponent] * 255.0),
|
||||
(unsigned int)(alpha * 255.0));
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
{
|
||||
@ -253,7 +262,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
}
|
||||
break;
|
||||
case eColorID__moz_mac_focusring:
|
||||
aColor = GetColorFromNSColor([NSColor keyboardFocusIndicatorColor]);
|
||||
aColor = GetColorFromNSColorWithAlpha([NSColor keyboardFocusIndicatorColor], 0.48);
|
||||
break;
|
||||
case eColorID__moz_mac_menushadow:
|
||||
aColor = NS_RGB(0xA3,0xA3,0xA3);
|
||||
|
Loading…
Reference in New Issue
Block a user