Refactor layout pipeline, add KEY5 regression, and fix tooltip hide
This commit is contained in:
+5
-4
@@ -683,10 +683,11 @@ void Button::hideTooltip()
|
||||
if (tipVisible)
|
||||
{
|
||||
tipVisible = false;
|
||||
if (auto* host = getHostWindow(); host && host->isManagedDispatchActive())
|
||||
tipLabel.invalidateBackgroundSnapshot();
|
||||
else
|
||||
tipLabel.hide(); // 还原快照+作废,防止残影
|
||||
// Tooltip 是 Button 的内置浮层,不属于独立控件树节点。
|
||||
// 因此在隐藏时应直接回贴它自己的背景快照并作废,
|
||||
// 不能仅仅作废快照,否则当本轮只重绘按钮本体区域时,
|
||||
// Tooltip 占用的那块屏幕可能无人擦除,最终表现为“鼠标移开后提示框残留”。
|
||||
tipLabel.hide(); // 还原快照 + 作废快照,立即清掉 Tooltip 自身绘制区域
|
||||
tipHoverTick = GetTickCount64(); // 重置计时基线
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user