Loading editor/widgets/trustlinks/trustlinks.cpp +6 −5 Changes for editor/widgets/trustlinks/trustlinks.cpp: 6 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -672,12 +672,13 @@ extern "C" { std::string viewBox, inner; svgmarkup::parse(customIconSvg, viewBox, inner); std::string vb = viewBox.empty() ? "0 0 24 24" : viewBox; // fill="currentColor" so an icon whose paths don't hardcode // their own color inherits the card's text color instead of // rendering in whatever color happened to be authored (often // black, which can look "wrong" or vanish on a dark card). // Explicit Icon Color wins; otherwise fall back to // currentColor so an icon whose paths don't hardcode // their own color at least inherits the ambient text // color instead of whatever it happened to be authored in. std::string iconFill = validCss(iconColor) ? iconColor : "currentColor"; std::string iconSvgHtml = "<svg width=\"28\" height=\"28\" viewBox=\"" + vb + "\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">" + inner + "</svg>"; "\" fill=\"" + iconFill + "\" xmlns=\"http://www.w3.org/2000/svg\">" + inner + "</svg>"; try { libhtmlpp::HtmlString htmlBuf(iconSvgHtml); libhtmlpp::Element &parsed = htmlBuf.parse(); Loading Loading
editor/widgets/trustlinks/trustlinks.cpp +6 −5 Changes for editor/widgets/trustlinks/trustlinks.cpp: 6 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -672,12 +672,13 @@ extern "C" { std::string viewBox, inner; svgmarkup::parse(customIconSvg, viewBox, inner); std::string vb = viewBox.empty() ? "0 0 24 24" : viewBox; // fill="currentColor" so an icon whose paths don't hardcode // their own color inherits the card's text color instead of // rendering in whatever color happened to be authored (often // black, which can look "wrong" or vanish on a dark card). // Explicit Icon Color wins; otherwise fall back to // currentColor so an icon whose paths don't hardcode // their own color at least inherits the ambient text // color instead of whatever it happened to be authored in. std::string iconFill = validCss(iconColor) ? iconColor : "currentColor"; std::string iconSvgHtml = "<svg width=\"28\" height=\"28\" viewBox=\"" + vb + "\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">" + inner + "</svg>"; "\" fill=\"" + iconFill + "\" xmlns=\"http://www.w3.org/2000/svg\">" + inner + "</svg>"; try { libhtmlpp::HtmlString htmlBuf(iconSvgHtml); libhtmlpp::Element &parsed = htmlBuf.parse(); Loading