File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11#include " marginwrapper.hpp"
2+ #include < cmath>
23
34#include < qobject.h>
45#include < qquickitem.h>
@@ -39,7 +40,7 @@ MarginWrapperManager::MarginWrapperManager(QObject* parent): WrapperManager(pare
3940 auto total = this ->bLeftMargin + this ->bRightMargin ;
4041 auto mul = total == 0 ? 0.5 : this ->bLeftMargin / total;
4142 auto margin = this ->bWrapperWidth - this ->bChildImplicitWidth ;
42- return margin * mul;
43+ return std::round ( margin * mul) ;
4344 });
4445
4546 this ->bChildY .setBinding ([this ] {
@@ -48,7 +49,7 @@ MarginWrapperManager::MarginWrapperManager(QObject* parent): WrapperManager(pare
4849 auto total = this ->bTopMargin + this ->bBottomMargin ;
4950 auto mul = total == 0 ? 0.5 : this ->bTopMargin / total;
5051 auto margin = this ->bWrapperHeight - this ->bChildImplicitHeight ;
51- return margin * mul;
52+ return std::round ( margin * mul) ;
5253 });
5354
5455 this ->bChildWidth .setBinding ([this ] {
You can’t perform that action at this time.
0 commit comments