diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp index fd251bfb13d5..243314a3198a 100644 --- a/widget/gtk/nsLookAndFeel.cpp +++ b/widget/gtk/nsLookAndFeel.cpp @@ -1620,7 +1620,7 @@ static void EnsureColorPairIsOpaque(nscolor& aBg, nscolor& aFg) { // Blend with white, ensuring the color is opaque, so that the UI doesn't have // to care about alpha. aBg = NS_ComposeColors(NS_RGB(0xff, 0xff, 0xff), aBg); - aFg = NS_ComposeColors(NS_RGB(0xff, 0xff, 0xff), aFg); + aFg = NS_ComposeColors(aBg, aFg); } static void PreferDarkerBackground(nscolor& aBg, nscolor& aFg) { @@ -1903,7 +1903,6 @@ void nsLookAndFeel::PerThemeData::Init() { mSelectedItemText = mTextSelectedText; } - PreferDarkerBackground(mSelectedItem, mSelectedItemText); EnsureColorPairIsOpaque(mSelectedItem, mSelectedItemText); // In a similar fashion, default accent color is the selected item/text @@ -1919,8 +1918,8 @@ void nsLookAndFeel::PerThemeData::Init() { mAccentColorForeground = mSelectedItemText; } - PreferDarkerBackground(mAccentColor, mAccentColorForeground); EnsureColorPairIsOpaque(mAccentColor, mAccentColorForeground); + PreferDarkerBackground(mAccentColor, mAccentColorForeground); } // Button text color