From 8dcc49c127e2c0834181483a52335db2665cd5cb Mon Sep 17 00:00:00 2001 From: fxliang Date: Thu, 10 Aug 2023 14:29:04 +0800 Subject: [PATCH] fixed: round corner radius for highlighted candidate not correct when hemispherical triggered --- WeaselUI/WeaselPanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeaselUI/WeaselPanel.cpp b/WeaselUI/WeaselPanel.cpp index 66a252e08..7ca9a0728 100644 --- a/WeaselUI/WeaselPanel.cpp +++ b/WeaselUI/WeaselPanel.cpp @@ -355,7 +355,7 @@ void WeaselPanel::_HighlightText(CDCHandle &dc, CRect rc, COLORREF color, COLORR GraphicsRoundRectPath* hiliteBackPath; if (rd.Hemispherical && type!= BackType::BACKGROUND && NOT_FULLSCREENLAYOUT(m_style)) - hiliteBackPath = new GraphicsRoundRectPath(rc, m_style.round_corner_ex - m_style.border/2 + (m_style.border % 2), rd.IsTopLeftNeedToRound, rd.IsTopRightNeedToRound, rd.IsBottomRightNeedToRound, rd.IsBottomLeftNeedToRound); + hiliteBackPath = new GraphicsRoundRectPath(rc, m_style.round_corner_ex - (m_style.border%2 ? m_style.border / 2 : 0) , rd.IsTopLeftNeedToRound, rd.IsTopRightNeedToRound, rd.IsBottomRightNeedToRound, rd.IsBottomLeftNeedToRound); else // background or current candidate background not out of window background hiliteBackPath = new GraphicsRoundRectPath(rc, radius);