From 0439dad2fc7cd94d41c29085268b6237bb5cbee9 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Tue, 4 Feb 2025 16:39:28 +0530 Subject: [PATCH 1/2] fixed text opacity bug --- src/desktop-style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index 5b2cb8cf42..cfcb6220f2 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -152,7 +152,7 @@ sp_desktop_apply_css_recursive(SPObject *o, SPCSSAttr *css, bool skip_lines) } for (auto& child: o->children) { - if (sp_repr_css_property(css, "opacity", nullptr) != nullptr) { + if (sp_repr_css_property(css, "opacity", nullptr) != nullptr && is(o)) { // Unset properties which are accumulating and thus should not be set recursively. // For example, setting opacity 0.5 on a group recursively would result in the visible opacity of 0.25 for an item in the group. SPCSSAttr *css_recurse = sp_repr_css_attr_new(); -- GitLab From 2210de28d72a9ce0d1462a2c6600c24ebe19a486 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Tue, 4 Feb 2025 20:48:06 +0530 Subject: [PATCH 2/2] refactored text opacity bug solution --- src/desktop-style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index cfcb6220f2..2137dc3ed2 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -152,7 +152,7 @@ sp_desktop_apply_css_recursive(SPObject *o, SPCSSAttr *css, bool skip_lines) } for (auto& child: o->children) { - if (sp_repr_css_property(css, "opacity", nullptr) != nullptr && is(o)) { + if (sp_repr_css_property(css, "opacity", nullptr) != nullptr && !isTextualItem(o)) { // Unset properties which are accumulating and thus should not be set recursively. // For example, setting opacity 0.5 on a group recursively would result in the visible opacity of 0.25 for an item in the group. SPCSSAttr *css_recurse = sp_repr_css_attr_new(); -- GitLab