diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-15 12:40:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-15 17:07:15 +0200 |
commit | 7099902bc9ebdc5407d7cd917a57188bb575dd66 (patch) | |
tree | de64ba71425b481e8632938c766de85385749af0 /vcl/unx/gtk4 | |
parent | 39251e461bfe628da875bb17e91dc374f137eec5 (diff) |
gtk4: convert all the larger old icon sizes to GTK_ICON_SIZE_LARGE
Change-Id: I88921495e60f47b54e4d473315ee953872e61891
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117248
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk4')
-rw-r--r-- | vcl/unx/gtk4/convert3to4.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx index d1d56926acd9..f99bdc9517ff 100644 --- a/vcl/unx/gtk4/convert3to4.cxx +++ b/vcl/unx/gtk4/convert3to4.cxx @@ -493,17 +493,26 @@ ConvertResult Convert3To4(const css::uno::Reference<css::xml::dom::XNode>& xNode { if (GetParentObjectType(xChild) == "GtkImage") { - if (xChild->getFirstChild()->getNodeValue() == "6") + OUString sSize = xChild->getFirstChild()->getNodeValue(); + /* + old: + 3 -> GTK_ICON_SIZE_LARGE_TOOLBAR: Size appropriate for large toolbars (24px) + 5 -> GTK_ICON_SIZE_DND: Size appropriate for drag and drop (32px) + 6 -> GTK_ICON_SIZE_DIALOG: Size appropriate for dialogs (48px) + + new: + 2 -> GTK_ICON_SIZE_LARGE + */ + if (sSize == "3" || sSize == "5" || sSize == "6") { auto xDoc = xChild->getOwnerDocument(); - // convert old GTK_ICON_SIZE_DIALOG to new GTK_ICON_SIZE_LARGE auto xIconSize = CreateProperty(xDoc, "icon-size", "2"); xChild->getParentNode()->insertBefore(xIconSize, xChild); - xRemoveList.push_back(xChild); } else SAL_WARN("vcl.gtk", "what should we do with an icon-size of: " << xChild->getFirstChild()->getNodeValue()); + xRemoveList.push_back(xChild); } else if (GetParentObjectType(xChild) == "GtkPicture") xRemoveList.push_back(xChild); |