config: Refactor class member vars (#10124)
* Refactor config classes vars * Fix clang format errors
This commit is contained in:
parent
9b4060f09b
commit
4d14bcb02f
18 changed files with 343 additions and 343 deletions
|
|
@ -61,13 +61,13 @@ void CHyprBorderDecoration::draw(PHLMONITOR pMonitor, float const& a) {
|
|||
const bool ANIMATED = m_pWindow->m_fBorderFadeAnimationProgress->isBeingAnimated();
|
||||
|
||||
if (m_pWindow->m_fBorderAngleAnimationProgress->enabled()) {
|
||||
grad.m_fAngle += m_pWindow->m_fBorderAngleAnimationProgress->value() * M_PI * 2;
|
||||
grad.m_fAngle = normalizeAngleRad(grad.m_fAngle);
|
||||
grad.m_angle += m_pWindow->m_fBorderAngleAnimationProgress->value() * M_PI * 2;
|
||||
grad.m_angle = normalizeAngleRad(grad.m_angle);
|
||||
|
||||
// When borderangle is animated, it is counterintuitive to fade between inactive/active gradient angles.
|
||||
// Instead we sync the angles to avoid fading between them and additionally rotating the border angle.
|
||||
if (ANIMATED)
|
||||
m_pWindow->m_cRealBorderColorPrevious.m_fAngle = grad.m_fAngle;
|
||||
m_pWindow->m_cRealBorderColorPrevious.m_angle = grad.m_angle;
|
||||
}
|
||||
|
||||
int borderSize = m_pWindow->getRealBorderSize();
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ void CHyprGroupBarDecoration::draw(PHLMONITOR pMonitor, float const& a) {
|
|||
const auto* const PCOLACTIVE = GROUPLOCKED ? GROUPCOLACTIVELOCKED : GROUPCOLACTIVE;
|
||||
const auto* const PCOLINACTIVE = GROUPLOCKED ? GROUPCOLINACTIVELOCKED : GROUPCOLINACTIVE;
|
||||
|
||||
CHyprColor color = m_dwGroupMembers[WINDOWINDEX].lock() == g_pCompositor->m_pLastWindow.lock() ? PCOLACTIVE->m_vColors[0] : PCOLINACTIVE->m_vColors[0];
|
||||
CHyprColor color = m_dwGroupMembers[WINDOWINDEX].lock() == g_pCompositor->m_pLastWindow.lock() ? PCOLACTIVE->m_colors[0] : PCOLINACTIVE->m_colors[0];
|
||||
color.a *= a;
|
||||
|
||||
if (!rect.empty()) {
|
||||
|
|
@ -306,9 +306,9 @@ static void renderGradientTo(SP<CTexture> tex, CGradientValueData* grad) {
|
|||
cairo_pattern_t* pattern;
|
||||
pattern = cairo_pattern_create_linear(0, 0, 0, bufferSize.y);
|
||||
|
||||
for (unsigned long i = 0; i < grad->m_vColors.size(); i++) {
|
||||
cairo_pattern_add_color_stop_rgba(pattern, 1 - (double)(i + 1) / (grad->m_vColors.size() + 1), grad->m_vColors[i].r, grad->m_vColors[i].g, grad->m_vColors[i].b,
|
||||
grad->m_vColors[i].a);
|
||||
for (unsigned long i = 0; i < grad->m_colors.size(); i++) {
|
||||
cairo_pattern_add_color_stop_rgba(pattern, 1 - (double)(i + 1) / (grad->m_colors.size() + 1), grad->m_colors[i].r, grad->m_colors[i].g, grad->m_colors[i].b,
|
||||
grad->m_colors[i].a);
|
||||
}
|
||||
|
||||
cairo_rectangle(CAIRO, 0, 0, bufferSize.x, bufferSize.y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue