Merge remote-tracking branch 'ryzomcore/develop' into core4

merge/2021-11-19
kaetemi 3 years ago
commit 1b162fb3ae
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -394,6 +394,9 @@ namespace NLGUI
CSSBackgroundRenderer m_HtmlBackground;
CSSBackgroundRenderer m_BodyBackground;
// active table.tr background color from css or from bgcolor attribute
std::vector<NLMISC::CRGBA> m_TableRowBackgroundColor;
// Valid base href was found
bool _IgnoreBaseUrlTag;
// Fragment from loading url

@ -3079,6 +3079,7 @@ namespace NLGUI
_IgnoreHeadTag = false;
_IgnoreBaseUrlTag = false;
_AutoIdSeq = 0;
m_TableRowBackgroundColor.clear();
paragraphChange ();
@ -6620,20 +6621,11 @@ namespace NLGUI
// ***************************************************************************
void CGroupHTML::htmlTD(const CHtmlElement &elm)
{
CRGBA rowColor = CRGBA::Transparent;
// remember row color so we can blend it with cell color
if (!_CellParams.empty())
rowColor = _CellParams.back().BgColor;
// Get cells parameters
getCellsParameters(elm, true);
// if cell has own background,then it must be blended with row
if (rowColor.A > 0 && _Style.Current.Background.color.A < 255)
{
_Style.Current.Background.color.blendFromui(rowColor,
_Style.Current.Background.color, _Style.Current.Background.color.A);
}
if (!m_TableRowBackgroundColor.empty() && m_TableRowBackgroundColor.back().A > 0)
_Style.Current.Background.color.blendFromui(m_TableRowBackgroundColor.back(), _Style.Current.Background.color, _Style.Current.Background.color.A);
if (elm.ID == HTML_TH)
{
@ -6849,6 +6841,9 @@ namespace NLGUI
// Get cells parameters
getCellsParameters(elm, true);
m_TableRowBackgroundColor.push_back(_CellParams.back().BgColor);
_CellParams.back().BgColor = CRGBA::Transparent;
// TODO: this probably ends up in first cell
renderPseudoElement(":before", elm);
@ -6863,6 +6858,7 @@ namespace NLGUI
renderPseudoElement(":after", elm);
popIfNotEmpty(_CellParams);
popIfNotEmpty(m_TableRowBackgroundColor);
}
// ***************************************************************************

Loading…
Cancel
Save