From 5fe9550eb2b598afdbed922afda08b8883adf035 Mon Sep 17 00:00:00 2001 From: fxliang Date: Wed, 20 Dec 2023 08:57:46 +0800 Subject: [PATCH] fix: hilited back 1 px out of back, when hilite_padding equal to margin and border equal to 0 (#1057) --- WeaselUI/WeaselPanel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WeaselUI/WeaselPanel.cpp b/WeaselUI/WeaselPanel.cpp index 062eb12a7..7d2671a9a 100644 --- a/WeaselUI/WeaselPanel.cpp +++ b/WeaselUI/WeaselPanel.cpp @@ -778,6 +778,8 @@ void WeaselPanel::DoPaint(CDCHandle dc) // background and candidates back, hilite back drawing start if ((!m_ctx.empty() && !m_style.inline_preedit) || (m_style.inline_preedit && (m_candidateCount || !m_ctx.aux.empty() ))) { CRect backrc = m_layout->GetContentRect(); + if (!m_style.border) + backrc.InflateRect(1,1); _HighlightText(memDC, backrc, m_style.back_color, m_style.shadow_color, m_style.round_corner_ex, BackType::BACKGROUND, IsToRoundStruct(), m_style.border_color); } if (!m_ctx.aux.str.empty())