cui/source/dialogs/cuicharmap.cxx | 2 ++ svx/source/dialog/charmap.cxx | 13 +++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit e7895fbacff945d38f679f504c179a417e3b9af1 Author: Andreas Heinisch <andreas.heini...@yahoo.de> AuthorDate: Sat Mar 12 17:50:33 2022 +0100 Commit: Andreas Heinisch <andreas.heini...@yahoo.de> CommitDate: Wed Mar 16 16:52:51 2022 +0100 tdf#109214 - Highlight the favorites in the grid of special characters Change-Id: Ie1bb019495d2db4acd92da4bccf44ece2bd1d976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131446 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index bda30b764f26..0e991d6dce16 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -421,6 +421,8 @@ void SvxCharacterMap::updateFavCharControl() } m_xShowSet->getFavCharacterList(); m_xSearchSet->getFavCharacterList(); + // tdf#109214 - redraw highlight of the favorite characters + m_xShowSet->Invalidate(); } void SvxCharacterMap::deleteFavCharacterFromList(std::u16string_view sTitle, std::u16string_view rFont) diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 23b6cda06ec7..6b618d51f73b 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -567,6 +567,19 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, aPointTxTy.AdjustX(nXHDelta - 1 ); } + // tdf#109214 - highlight the favorite characters + if (isFavChar(aCharStr, mxVirDev->GetFont().GetFamilyName())) + { + const Color aLineCol = rRenderContext.GetLineColor(); + rRenderContext.SetLineColor(aHighlightColor); + rRenderContext.SetFillColor(COL_TRANSPARENT); + // Outer border + rRenderContext.DrawRect(tools::Rectangle(Point(x - 1, y - 1), Size(nX + 3, nY + 3))); + // Inner border + rRenderContext.DrawRect(tools::Rectangle(Point(x, y), Size(nX + 1, nY + 1))); + rRenderContext.SetLineColor(aLineCol); + } + Color aTextCol = rRenderContext.GetTextColor(); if (i != nSelectedIndex) {