diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-15 16:26:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-15 18:21:28 +0200 |
commit | 93e2cc6d5d3408a4d480ac9a44e6adb0060965bf (patch) | |
tree | 805df546effca8142d2001f3bb876832e1b4d769 | |
parent | d00a65466346b47645faf5826f8c8eb5a91f031b (diff) |
gtk4: use GtkPicture for view, user interface
Change-Id: I6677233dc0594d6b2e9ea4b8f901550dbff46361
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117261
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/gtk4/convert3to4.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx index f5e75a49b1ce..24b67f01e576 100644 --- a/vcl/unx/gtk4/convert3to4.cxx +++ b/vcl/unx/gtk4/convert3to4.cxx @@ -1207,7 +1207,22 @@ ConvertResult Convert3To4(const css::uno::Reference<css::xml::dom::XNode>& xNode OUString sIconName(xChildPropertyIconName->getFirstChild()->getNodeValue()); bool bHasSymbolicIconName = IsAllowedBuiltInIcon(sIconName); if (bHasSymbolicIconName) - bKeepAsImage = true; + { + if (sIconName != "missing-image") + bKeepAsImage = true; + else + { + // If the symbolic icon-name is missing-image then decide to make + // it a GtkPicture if it has a parent widget and keep it as GtkImage + // if it has just the root "interface" as parent. + // for e.g. view, user interface + css::uno::Reference<css::xml::dom::XNode> xParent + = xChild->getParentNode(); + bKeepAsImage = xParent->getNodeName() == "interface"; + if (!bKeepAsImage) + xChild->removeChild(xChildPropertyIconName); + } + } else { // private:graphicrepository/ would be turned by gio (?) into private:///graphicrepository/ |