Merge pull request 'dashboard crash fix' (#70) from dashboard-crash-fix into main
Reviewed-on: #70
This commit was merged in pull request #70.
This commit is contained in:
@@ -22,8 +22,7 @@ Item {
|
|||||||
implicitHeight: content.implicitHeight
|
implicitHeight: content.implicitHeight
|
||||||
implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open
|
implicitWidth: content.implicitWidth || 854 // Hard coded fallback for first open
|
||||||
opacity: 1 - offsetScale
|
opacity: 1 - offsetScale
|
||||||
|
visible: offsetScale < 1
|
||||||
// visible: offsetScale < 1
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: content
|
id: content
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ RowLayout {
|
|||||||
color: root.mainColor
|
color: root.mainColor
|
||||||
implicitHeight: Math.ceil(root.percentage * parent.height)
|
implicitHeight: Math.ceil(root.percentage * parent.height)
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
// Behavior on implicitHeight {
|
||||||
Anim {
|
// Anim {
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,11 +158,12 @@ void BlobRect::setBottomRightRadius(qreal r) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BlobRect::cornerRadii(float out[4]) const {
|
void BlobRect::cornerRadii(float out[4]) const {
|
||||||
const auto base = static_cast<float>(m_radius);
|
const auto maxR = static_cast<float>(std::min(width(), height())) * 0.5f;
|
||||||
out[0] = m_topRightRadius >= 0 ? static_cast<float>(m_topRightRadius) : base;
|
const auto base = std::min(static_cast<float>(m_radius), maxR);
|
||||||
out[1] = m_bottomRightRadius >= 0 ? static_cast<float>(m_bottomRightRadius) : base;
|
out[0] = std::min(m_topRightRadius >= 0 ? static_cast<float>(m_topRightRadius) : base, maxR);
|
||||||
out[2] = m_bottomLeftRadius >= 0 ? static_cast<float>(m_bottomLeftRadius) : base;
|
out[1] = std::min(m_bottomRightRadius >= 0 ? static_cast<float>(m_bottomRightRadius) : base, maxR);
|
||||||
out[3] = m_topLeftRadius >= 0 ? static_cast<float>(m_topLeftRadius) : base;
|
out[2] = std::min(m_bottomLeftRadius >= 0 ? static_cast<float>(m_bottomLeftRadius) : base, maxR);
|
||||||
|
out[3] = std::min(m_topLeftRadius >= 0 ? static_cast<float>(m_topLeftRadius) : base, maxR);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BlobRect::isExcluded(const BlobShape* other) const {
|
bool BlobRect::isExcluded(const BlobShape* other) const {
|
||||||
|
|||||||
@@ -72,15 +72,11 @@ void BlobShape::geometryChange(const QRectF& newGeometry, const QRectF& oldGeome
|
|||||||
// Accumulate sub-pixel drift so slow movements don't desync the shader
|
// Accumulate sub-pixel drift so slow movements don't desync the shader
|
||||||
m_pendingDx += static_cast<float>(newGeometry.x() - oldGeometry.x());
|
m_pendingDx += static_cast<float>(newGeometry.x() - oldGeometry.x());
|
||||||
m_pendingDy += static_cast<float>(newGeometry.y() - oldGeometry.y());
|
m_pendingDy += static_cast<float>(newGeometry.y() - oldGeometry.y());
|
||||||
m_pendingDw += static_cast<float>(newGeometry.width() - oldGeometry.width());
|
const auto dw = std::abs(newGeometry.width() - oldGeometry.width());
|
||||||
m_pendingDh += static_cast<float>(newGeometry.height() - oldGeometry.height());
|
const auto dh = std::abs(newGeometry.height() - oldGeometry.height());
|
||||||
|
if (std::abs(m_pendingDx) > 0.5f || std::abs(m_pendingDy) > 0.5f || dw > 0.5 || dh > 0.5) {
|
||||||
if (std::abs(m_pendingDx) > 0.5f || std::abs(m_pendingDy) > 0.5f ||
|
|
||||||
std::abs(m_pendingDw) > 0.5f || std::abs(m_pendingDh) > 0.5f) {
|
|
||||||
m_pendingDx = 0;
|
m_pendingDx = 0;
|
||||||
m_pendingDy = 0;
|
m_pendingDy = 0;
|
||||||
m_pendingDw = 0;
|
|
||||||
m_pendingDh = 0;
|
|
||||||
m_group->markShapeDirty(this);
|
m_group->markShapeDirty(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,7 +96,8 @@ void BlobShape::updateCenteredDeformMatrix() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BlobShape::cornerRadii(float out[4]) const {
|
void BlobShape::cornerRadii(float out[4]) const {
|
||||||
const auto r = static_cast<float>(m_radius);
|
const auto maxR = static_cast<float>(std::min(width(), height())) * 0.5f;
|
||||||
|
const auto r = std::min(static_cast<float>(m_radius), maxR);
|
||||||
out[0] = r;
|
out[0] = r;
|
||||||
out[1] = r;
|
out[1] = r;
|
||||||
out[2] = r;
|
out[2] = r;
|
||||||
|
|||||||
@@ -85,8 +85,6 @@ QVector<BlobRectData> m_cachedRects;
|
|||||||
int m_cachedMyIndex = -2;
|
int m_cachedMyIndex = -2;
|
||||||
float m_pendingDx = 0;
|
float m_pendingDx = 0;
|
||||||
float m_pendingDy = 0;
|
float m_pendingDy = 0;
|
||||||
float m_pendingDw = 0;
|
|
||||||
float m_pendingDh = 0;
|
|
||||||
bool m_cachedHasInverted = false;
|
bool m_cachedHasInverted = false;
|
||||||
float m_cachedInvertedRadius = 0;
|
float m_cachedInvertedRadius = 0;
|
||||||
float m_cachedInvertedOuter[4] = {};
|
float m_cachedInvertedOuter[4] = {};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ pragma UseQApplication
|
//@ pragma UseQApplication
|
||||||
//@ pragma Env QSG_RENDER_LOOP=threaded
|
//@ pragma Env QSG_RENDER_LOOP=threaded
|
||||||
// @ pragma Env QSG_RHI_BACKEND=vulkan
|
// @ pragma Env QSG_RHI_BACKEND=vulkan
|
||||||
//@ pragma Env QSG_USE_SIMPLE_ANIMATION_DRIVER=0
|
//@ pragma Env QSG_NO_VSYNC=1
|
||||||
//@ pragma Env QS_NO_RELOAD_POPUP=1
|
//@ pragma Env QS_NO_RELOAD_POPUP=1
|
||||||
//@ pragma Env QT_SCALE_FACTOR_ROUNDING_POLICY=Round
|
//@ pragma Env QT_SCALE_FACTOR_ROUNDING_POLICY=Round
|
||||||
//@ pragma DropExpensiveFonts
|
//@ pragma DropExpensiveFonts
|
||||||
|
|||||||
Reference in New Issue
Block a user