增加预览页介绍信息显示

This commit is contained in:
2026-04-08 09:56:25 +08:00
parent f53fee8e5a
commit 028ed1b18d
17 changed files with 1059 additions and 23 deletions

View File

@@ -117,7 +117,11 @@ void Vec2ParamControl::emitIfChanged() {
if (m_block || !m_x || !m_y) return;
const double nx = m_x->value();
const double ny = m_y->value();
if (nx == m_lastX && ny == m_lastY) return;
auto nearEq = [](double a, double b) {
const double scale = std::max({1.0, std::abs(a), std::abs(b)});
return std::abs(a - b) <= 1e-4 * scale;
};
if (nearEq(nx, m_lastX) && nearEq(ny, m_lastY)) return;
m_lastX = nx;
m_lastY = ny;
emit valueChanged(nx, ny);