chase hyprland

This commit is contained in:
Zakk
2025-01-11 22:17:23 -05:00
parent fa881dd386
commit f967a76006

View File

@@ -116,7 +116,7 @@ void CHyprEasyLabel::draw(PHLMONITOR pMonitor, float const &a) {
return; return;
const auto PWORKSPACE = m_pWindow->m_pWorkspace; const auto PWORKSPACE = m_pWindow->m_pWorkspace;
const auto WORKSPACEOFFSET = PWORKSPACE && !m_pWindow->m_bPinned ? PWORKSPACE->m_vRenderOffset.value() : Vector2D(); const auto WORKSPACEOFFSET = PWORKSPACE && !m_pWindow->m_bPinned ? PWORKSPACE->m_vRenderOffset->value() : Vector2D();
const auto ROUNDING = m_iRounding; const auto ROUNDING = m_iRounding;
@@ -180,15 +180,15 @@ CBox CHyprEasyLabel::assignedBoxGlobal() {
double boxHeight, boxWidth; double boxHeight, boxWidth;
double boxSize; double boxSize;
boxHeight = m_pWindow->m_vRealSize.value().y * 0.10; boxHeight = m_pWindow->m_vRealSize->value().y * 0.10;
boxWidth = m_pWindow->m_vRealSize.value().x * 0.10; boxWidth = m_pWindow->m_vRealSize->value().x * 0.10;
boxSize = std::min(boxHeight, boxWidth); boxSize = std::min(boxHeight, boxWidth);
double boxX = m_pWindow->m_vRealPosition.value().x + (m_pWindow->m_vRealSize.value().x-boxSize)/2; double boxX = m_pWindow->m_vRealPosition->value().x + (m_pWindow->m_vRealSize->value().x-boxSize)/2;
double boxY = m_pWindow->m_vRealPosition.value().y + (m_pWindow->m_vRealSize.value().y-boxSize)/2; double boxY = m_pWindow->m_vRealPosition->value().y + (m_pWindow->m_vRealSize->value().y-boxSize)/2;
CBox box = {boxX, boxY, boxSize, boxSize}; CBox box = {boxX, boxY, boxSize, boxSize};
const auto PWORKSPACE = m_pWindow->m_pWorkspace; const auto PWORKSPACE = m_pWindow->m_pWorkspace;
const auto WORKSPACEOFFSET = PWORKSPACE && !m_pWindow->m_bPinned ? PWORKSPACE->m_vRenderOffset.value() : Vector2D(); const auto WORKSPACEOFFSET = PWORKSPACE && !m_pWindow->m_bPinned ? PWORKSPACE->m_vRenderOffset->value() : Vector2D();
return box.translate(WORKSPACEOFFSET); return box.translate(WORKSPACEOFFSET);
} }