summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2023-02-27 19:11:59 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-28 07:15:19 +0000
commit9da3d052b9048e9139b6943621f4eb6777422078 (patch)
tree87c76b53c45d5c41327ef59e018efbf38e1d580c /svx/source
parentdbd96e1c9a066979cb80ced6268edb148a8fc73b (diff)
tdf#109214 - Highlight the favorites in the grid of special characters
Change-Id: I3b19aa833be4c7b9b0499ad051a240f131eba7ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147926 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/searchcharmap.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx
index 034ebd317a5a..637fbbe0d834 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -230,6 +230,19 @@ void SvxSearchCharSet::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)
{