Details
Details
- Reviewers
davidedmundson - Group Reviewers
Breeze
Diff Detail
Diff Detail
- Repository
- R31 Breeze
- Branch
- properly-compare-opacity
- Lint
No Linters Available - Unit
No Unit Test Coverage
Comment Actions
Opacity can be 0. But, yeah, I could use it with the +1 trick(e.g. qFuzzyCompare(m_opacity + 1.0, value + 1.0)).
That's mostly a matter of choice, I guess.
PS. Please notice that checking absolute error is enough when comparing opacities.
Comment Actions
Whilst qFuzzyCompare is indeed needed for comparing a calculation with a value, it's not relevant in all cases, like this.
We want setOpacity(actually zero) to update m_opacity over setOpacity(something near zero) as it hypothetically changes QPainter paths which check for actual zero.