diff options
author | Zain Iftikhar <zain.iftikhar@7vals.com> | 2022-04-16 04:31:02 +0500 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2022-05-01 10:03:41 +0200 |
commit | 405cbcdcaac4ebb9e68240ef8a94821f9f21f6a8 (patch) | |
tree | 9c1bd5ff45e6c824cef3d804a23fac6477378760 /vcl/source | |
parent | dd4c66095790993b0ba6a50a17ffff2908ac00cb (diff) |
tdf#141000 replacing underscores with spaces of multi words icon pack name
patch will replace underscores with spaces of multi words icon pack name.
Change-Id: If37f6617b7c90eb912ab2f58fff0f1df225efa66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133094
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
(cherry picked from commit 02b740a7a047052e60274b8649f3624267eb079f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133280
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/IconThemeInfo.cxx | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/vcl/source/app/IconThemeInfo.cxx b/vcl/source/app/IconThemeInfo.cxx index 139181e65a1a..47e7102adfe0 100644 --- a/vcl/source/app/IconThemeInfo.cxx +++ b/vcl/source/app/IconThemeInfo.cxx @@ -18,8 +18,6 @@ namespace { -constexpr OUStringLiteral KARASA_JAGA_ID(u"karasa_jaga"); -constexpr OUStringLiteral KARASA_JAGA_DISPLAY_NAME(u"Karasa Jaga"); constexpr OUStringLiteral HELPIMG_FAKE_THEME(u"helpimg"); OUString @@ -124,20 +122,16 @@ IconThemeInfo::ThemeIdToDisplayName(const OUString& themeId) if (!bIsSvg && bIsDark) bIsSvg = aDisplayName.endsWith("_svg", &aDisplayName); - // special cases - if (aDisplayName.equalsIgnoreAsciiCase(KARASA_JAGA_ID)) { - aDisplayName = KARASA_JAGA_DISPLAY_NAME; - } - else + // make the first letter uppercase + sal_Unicode firstLetter = aDisplayName[0]; + if (rtl::isAsciiLowerCase(firstLetter)) { - // make the first letter uppercase - sal_Unicode firstLetter = aDisplayName[0]; - if (rtl::isAsciiLowerCase(firstLetter)) - { - aDisplayName = OUStringChar(sal_Unicode(rtl::toAsciiUpperCase(firstLetter))) + aDisplayName.subView(1); - } + aDisplayName = OUStringChar(sal_Unicode(rtl::toAsciiUpperCase(firstLetter))) + aDisplayName.subView(1); } + // replacing underscores with spaces of multi words pack name. + aDisplayName = aDisplayName.replace('_', ' '); + if (bIsSvg && bIsDark) aDisplayName += " (SVG + dark)"; else if (bIsSvg) |