зеркало из https://github.com/mozilla/gecko-dev.git
fix burning
This commit is contained in:
Родитель
9d85e378b2
Коммит
0cbf83b279
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#include <Gestalt.h>
|
#include <Gestalt.h>
|
||||||
#include "nsNativeThemeMac.h"
|
#include "nsNativeThemeMac.h"
|
||||||
#include "nsRenderingContextMac.h"
|
#include "nsIRenderingContext.h"
|
||||||
#include "nsDeviceContextMac.h"
|
#include "nsDeviceContextMac.h"
|
||||||
#include "nsRect.h"
|
#include "nsRect.h"
|
||||||
#include "nsSize.h"
|
#include "nsSize.h"
|
||||||
|
@ -59,6 +59,22 @@
|
||||||
|
|
||||||
static PRBool sInitializedBorders = PR_FALSE;
|
static PRBool sInitializedBorders = PR_FALSE;
|
||||||
|
|
||||||
|
/* copied from nsRenderingContextMac */
|
||||||
|
PRBool
|
||||||
|
OnTigerOrLater()
|
||||||
|
{
|
||||||
|
static PRBool sInitVer = PR_FALSE;
|
||||||
|
static PRBool sOnTigerOrLater = PR_FALSE;
|
||||||
|
if (!sInitVer) {
|
||||||
|
long version;
|
||||||
|
OSErr err = ::Gestalt(gestaltSystemVersion, &version);
|
||||||
|
sOnTigerOrLater = ((err == noErr) && (version >= 0x00001040));
|
||||||
|
sInitVer = PR_TRUE;
|
||||||
|
}
|
||||||
|
return sOnTigerOrLater;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ConvertGeckoToNativeRect(const nsRect& aSrc, Rect& aDst)
|
ConvertGeckoToNativeRect(const nsRect& aSrc, Rect& aDst)
|
||||||
{
|
{
|
||||||
|
@ -177,7 +193,7 @@ nsNativeThemeMac::DrawButton ( ThemeButtonKind inKind, const Rect& inBoxRect, PR
|
||||||
// draw the focus ring with DrawThemeButton(), there are ugly lines all
|
// draw the focus ring with DrawThemeButton(), there are ugly lines all
|
||||||
// through the button. This may get fixed in a dot-release, but until it
|
// through the button. This may get fixed in a dot-release, but until it
|
||||||
// does, we can't draw the focus ring.
|
// does, we can't draw the focus ring.
|
||||||
if (inKind != kThemePushButton || nsRenderingContextMac::OnTigerOrLater())
|
if (inKind != kThemePushButton || OnTigerOrLater())
|
||||||
info.adornment = kThemeAdornmentFocus;
|
info.adornment = kThemeAdornmentFocus;
|
||||||
}
|
}
|
||||||
if ( inIsDefault )
|
if ( inIsDefault )
|
||||||
|
|
Загрузка…
Ссылка в новой задаче