Repository: rime/weasel (language: cpp)

Issue:
天圆地方模式下，当 border 为 0 时，会多出一个像素
当 `border_width` 设置为 0，期待完全不显示任何边框

但在天圆地方时 hilited 部分撑出候选框，导致多出一行像素，也有时候会少一个部分，

## 非行内预编辑模式

```yaml
horizontal: true
inline_preedit: false
# ……
border_width: 0
margin_x: 8
margin_y: 8
hilite_padding: 8
```
效果

![image](https://github.com/rime/weasel/assets/76689045/8c42ba5f-ac50-4d89-bb02-028a46336331)
 
放大看：

![image](https://github.com/rime/weasel/assets/76689045/0ddd3bee-5e60-4bb6-a4ca-6708c685a080)

## 行内预编辑

```yaml
inline_preedit: true
# ……
border_width: 0
margin_x: 8
margin_y: 8
hilite_padding: 8
corner_radius: 0
round_corner: 0
```
特地将圆角设置为 0，可以看到，少了一个部分：

![image](https://github.com/rime/weasel/assets/76689045/3d68c219-2c58-474b-a076-22873c76ce4e)

![image](https://github.com/rime/weasel/assets/76689045/9fdc369c-db80-4710-bf3a-b94967257545)

多了一行像素，并且不是配色设置的颜色，而是高亮区域的颜色，在高对比度的 Brasil 主题下：

![image](https://github.com/rime/weasel/assets/76689045/231a6781-d702-4235-8d62-78e7ab9c329e)

```yaml
brasil:
    name: "笆悉／Brasil"
    author: "Patricivs <ipatrickmac@me.com>"
    ……
    border_color: 0x559311
```



Discussion / hints:

Fix patch:
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())


Test patch: