From f68095a0d1796bdb71338354381814e87c5aee9d Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sun, 27 Mar 2022 19:05:40 +0200 Subject: [PATCH] making code more readable --- src/common/QskBoxBorderColors.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/QskBoxBorderColors.cpp b/src/common/QskBoxBorderColors.cpp index 054696dd..cbb12e5d 100644 --- a/src/common/QskBoxBorderColors.cpp +++ b/src/common/QskBoxBorderColors.cpp @@ -172,8 +172,14 @@ QskBoxBorderColors QskBoxBorderColors::interpolated( for ( size_t i = 0; i < 4; i++ ) { - colors.m_gradients[ i ] = colors.m_gradients[ i ].interpolated( - to.m_gradients[ i ], ratio ); +#if 1 + /* + When one border has a width of 0 we would prefer to ignore + the color and use always use the other color. TODO ... + */ +#endif + auto& gradient = colors.m_gradients[ i ]; + gradient = gradient.interpolated( to.m_gradients[ i ], ratio ); } return colors;