зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug 42186 - incorrect GdkColor to nscolor conversion. Also change
some of the CSS system colors to be more accurate. r=blizzard,pavlov.
This commit is contained in:
Родитель
c3d226dd61
Коммит
2ad6c0a37d
|
@ -26,7 +26,7 @@
|
||||||
#include "nsXPLookAndFeel.h"
|
#include "nsXPLookAndFeel.h"
|
||||||
|
|
||||||
#define GDK_COLOR_TO_NS_RGB(c) \
|
#define GDK_COLOR_TO_NS_RGB(c) \
|
||||||
((nscolor) NS_RGB(c.red, c.green, c.blue))
|
((nscolor) NS_RGB(c.red>>8, c.green>>8, c.blue>>8))
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS1(nsLookAndFeel, nsILookAndFeel)
|
NS_IMPL_ISUPPORTS1(nsLookAndFeel, nsILookAndFeel)
|
||||||
|
@ -151,6 +151,7 @@ NS_IMETHODIMP nsLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor)
|
||||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]);
|
aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]);
|
||||||
break;
|
break;
|
||||||
case eColor_scrollbar:
|
case eColor_scrollbar:
|
||||||
|
aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eColor_threedface:
|
case eColor_threedface:
|
||||||
|
@ -160,7 +161,7 @@ NS_IMETHODIMP nsLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor)
|
||||||
|
|
||||||
case eColor_buttonhighlight: // ?
|
case eColor_buttonhighlight: // ?
|
||||||
case eColor_threedhighlight:
|
case eColor_threedhighlight:
|
||||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_ACTIVE]);
|
aColor = NS_BrightenColor(GDK_COLOR_TO_NS_RGB(mStyle->light[GTK_STATE_NORMAL]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eColor_buttontext:
|
case eColor_buttontext:
|
||||||
|
@ -170,8 +171,7 @@ NS_IMETHODIMP nsLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor)
|
||||||
case eColor_buttonshadow:
|
case eColor_buttonshadow:
|
||||||
case eColor_threeddarkshadow:
|
case eColor_threeddarkshadow:
|
||||||
case eColor_threedshadow: // i think these should be the same
|
case eColor_threedshadow: // i think these should be the same
|
||||||
aColor = NS_DarkenColor(NS_DarkenColor(NS_DarkenColor(NS_DarkenColor(NS_DarkenColor(GDK_COLOR_TO_NS_RGB(mStyle->light[GTK_STATE_NORMAL]))))));
|
aColor = GDK_COLOR_TO_NS_RGB(mStyle->dark[GTK_STATE_NORMAL]);
|
||||||
// aColor = GDK_COLOR_TO_NS_RGB(mStyle->dark[GTK_STATE_NORMAL]); // dark style gives me bright green?!
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eColor_threedlightshadow:
|
case eColor_threedlightshadow:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче