Skip to content

Commit

Permalink
all: add new roundingPower parameter to render function calls (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
polluxcodes authored Jan 8, 2025
1 parent d224c84 commit 25d0292
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion borders-plus-plus/borderDeco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void CBordersPlusPlus::drawPass(PHLMONITOR pMonitor, const float& a) {
const auto WORKSPACEOFFSET = PWORKSPACE && !PWINDOW->m_bPinned ? PWORKSPACE->m_vRenderOffset->value() : Vector2D();

auto rounding = PWINDOW->rounding() == 0 ? 0 : (PWINDOW->rounding() + **PBORDERSIZE) * pMonitor->scale;
const auto ROUNDINGPOWER = PWINDOW->roundingPower();
const auto ORIGINALROUND = rounding == 0 ? 0 : (PWINDOW->rounding() + **PBORDERSIZE) * pMonitor->scale;

CBox fullBox = m_bAssignedGeometry;
Expand Down Expand Up @@ -136,7 +137,7 @@ void CBordersPlusPlus::drawPass(PHLMONITOR pMonitor, const float& a) {

g_pHyprOpenGL->scissor((CBox*)nullptr);

g_pHyprOpenGL->renderBorder(&fullBox, CHyprColor{(uint64_t)**PCOLORS[i]}, **PNATURALROUND ? ORIGINALROUND : rounding, THISBORDERSIZE, a,
g_pHyprOpenGL->renderBorder(&fullBox, CHyprColor{(uint64_t)**PCOLORS[i]}, **PNATURALROUND ? ORIGINALROUND : rounding, ROUNDINGPOWER, THISBORDERSIZE, a,
**PNATURALROUND ? ORIGINALROUND : -1);
}

Expand Down
2 changes: 1 addition & 1 deletion hyprtrails/trail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);

glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
g_pHyprOpenGL->renderRect(&wlrbox, CHyprColor(0, 0, 0, 0), PWINDOW->rounding() * pMonitor->scale);
g_pHyprOpenGL->renderRect(&wlrbox, CHyprColor(0, 0, 0, 0), PWINDOW->rounding() * pMonitor->scale, PWINDOW->roundingPower());
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);

glStencilFunc(GL_NOTEQUAL, 1, -1);
Expand Down

0 comments on commit 25d0292

Please sign in to comment.