From 5abdccfd6362073e78b732487ff3fe43fba20428 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 20 May 2021 08:49:31 +0300 Subject: [PATCH] Inherit -ryzom-modulate-bgcolor in table/td --- nel/src/gui/group_html.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/nel/src/gui/group_html.cpp b/nel/src/gui/group_html.cpp index 8a0073245..e9505abdc 100644 --- a/nel/src/gui/group_html.cpp +++ b/nel/src/gui/group_html.cpp @@ -6423,10 +6423,12 @@ namespace NLGUI string image = _Style.getStyle("background-image"); addImageDownload(image, table, CStyleParams(), NormalImage, ""); } + else + { + // will be set in addImageDownload if background-image exists + table->setModulateGlobalColor(_Style.Current.GlobalColor); + } - // setting ModulateGlobalColor must be after addImageDownload - if (_Style.checkStyle("-ryzom-modulate-bgcolor", "true")) - table->setModulateGlobalColor(true); table->setMarginLeft(getIndent()); addHtmlGroup (table, 0); @@ -6510,6 +6512,11 @@ namespace NLGUI string image = _Style.getStyle("background-image"); addImageDownload(image, _Cells.back(), CStyleParams(), NormalImage, ""); } + else + { + // will be set in addImageDownload if background-image is set + _Cells.back()->setModulateGlobalColor(_Style.Current.GlobalColor); + } if (elm.hasNonEmptyAttribute("colspan")) fromString(elm.getAttribute("colspan"), _Cells.back()->ColSpan); @@ -6546,10 +6553,6 @@ namespace NLGUI _Cells.back()->NewLine = getTR(); - // setting ModulateGlobalColor must be after addImageDownload - if (_Style.checkStyle("-ryzom-modulate-bgcolor", "true")) - _Cells.back()->setModulateGlobalColor(true); - // border from if (table->CellBorder) { -- 2.11.4.GIT