зеркало из https://github.com/mozilla/pjs.git
Bug 301688 - [Mac] Disabled buttons shoud never have a 'default button' look&feel. r=josh, sr=smfr, a=bsmedberg.
This commit is contained in:
Родитель
21e9081ad7
Коммит
b21d199d5d
|
@ -163,13 +163,15 @@ nsNativeThemeMac::DrawButton ( ThemeButtonKind inKind, const Rect& inBoxRect, PR
|
|||
PRInt32 inState )
|
||||
{
|
||||
ThemeButtonDrawInfo info;
|
||||
if ( inDisabled )
|
||||
info.state = kThemeStateUnavailableInactive;
|
||||
else
|
||||
info.state = ((inState & NS_EVENT_STATE_ACTIVE) && (inState & NS_EVENT_STATE_HOVER)) ?
|
||||
kThemeStatePressed : kThemeStateActive;
|
||||
|
||||
info.value = inValue;
|
||||
info.adornment = inAdornment;
|
||||
|
||||
if ( inDisabled )
|
||||
info.state = kThemeStateUnavailableInactive;
|
||||
else {
|
||||
info.state = ((inState & NS_EVENT_STATE_ACTIVE) && (inState & NS_EVENT_STATE_HOVER)) ?
|
||||
kThemeStatePressed : kThemeStateActive;
|
||||
if ( inState & NS_EVENT_STATE_FOCUS ) {
|
||||
// There is a bug in OS 10.2.x-10.3.x where if we are in a CG context and
|
||||
// draw the focus ring with DrawThemeButton(), there are ugly lines all
|
||||
|
@ -180,7 +182,7 @@ nsNativeThemeMac::DrawButton ( ThemeButtonKind inKind, const Rect& inBoxRect, PR
|
|||
}
|
||||
if ( inIsDefault )
|
||||
info.adornment |= kThemeAdornmentDefault;
|
||||
|
||||
}
|
||||
::DrawThemeButton ( &inBoxRect, inKind, &info, nsnull, mEraseProc, nsnull, 0L );
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче