Refine snapshot invalidation and modal resize behavior

This commit is contained in:
Codex
2026-03-29 20:47:04 +08:00
parent 4a6e153da5
commit 7f8431a18c
8 changed files with 33 additions and 20 deletions
+2 -2
View File
@@ -72,7 +72,7 @@ void Canvas::draw()
// 如果位置或尺寸变了,或没有有效缓存,则重新抓取
if (!saveBkImage || saveBkX != this->x - margin || saveBkY != this->y - margin || saveWidth != this->width + margin * 2 || saveHeight != this->height + margin * 2)
{
discardBackground();
invalidateBackgroundSnapshot();
saveBackground(this->x - margin, this->y - margin, this->width + margin * 2, this->height + margin * 2);
}
}
@@ -231,7 +231,7 @@ void Canvas::setIsVisible(bool visible)
control->setIsVisible(visible);
}
if (!visible)
this->updateBackground();
discardBackground();
}
void Canvas::setDirty(bool dirty)