Skip to content

Commit

Permalink
fix: hilited back 1 px out of back, when hilite_padding equal to marg…
Browse files Browse the repository at this point in the history
…in and border equal to 0 (#1057)
  • Loading branch information
fxliang authored Dec 20, 2023
1 parent 066fe94 commit 5fe9550
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions WeaselUI/WeaselPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 5fe9550

Please sign in to comment.