mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 23:45:58 +01:00
parent
d02ba422da
commit
167f2ed3b2
1 changed files with 5 additions and 2 deletions
|
@ -51,6 +51,11 @@ void CHyprBorderDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& of
|
||||||
if (m_bAssignedGeometry.width < m_seExtents.topLeft.x + 1 || m_bAssignedGeometry.height < m_seExtents.topLeft.y + 1)
|
if (m_bAssignedGeometry.width < m_seExtents.topLeft.x + 1 || m_bAssignedGeometry.height < m_seExtents.topLeft.y + 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
CBox windowBox = assignedBoxGlobal().translate(-pMonitor->vecPosition).expand(-m_pWindow->getRealBorderSize()).scale(pMonitor->scale).round();
|
||||||
|
|
||||||
|
if (windowBox.width < 1 || windowBox.height < 1)
|
||||||
|
return;
|
||||||
|
|
||||||
auto grad = m_pWindow->m_cRealBorderColor;
|
auto grad = m_pWindow->m_cRealBorderColor;
|
||||||
const bool ANIMATED = m_pWindow->m_fBorderFadeAnimationProgress.isBeingAnimated();
|
const bool ANIMATED = m_pWindow->m_fBorderFadeAnimationProgress.isBeingAnimated();
|
||||||
float a1 = a * (ANIMATED ? m_pWindow->m_fBorderFadeAnimationProgress.fl() : 1.f);
|
float a1 = a * (ANIMATED ? m_pWindow->m_fBorderFadeAnimationProgress.fl() : 1.f);
|
||||||
|
@ -60,8 +65,6 @@ void CHyprBorderDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& of
|
||||||
grad.m_fAngle = normalizeAngleRad(grad.m_fAngle);
|
grad.m_fAngle = normalizeAngleRad(grad.m_fAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBox windowBox = assignedBoxGlobal().translate(-pMonitor->vecPosition).expand(-m_pWindow->getRealBorderSize()).scale(pMonitor->scale).round();
|
|
||||||
|
|
||||||
int borderSize = m_pWindow->getRealBorderSize();
|
int borderSize = m_pWindow->getRealBorderSize();
|
||||||
const auto ROUNDING = m_pWindow->rounding() * pMonitor->scale;
|
const auto ROUNDING = m_pWindow->rounding() * pMonitor->scale;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue