Background
After PR #3030 (fix for #2941) changed the revealOffscreen branch to return kRevealComfortEdgeMarginFrac instead of 0.0, the ternary at src/gui/MainWindow.cpp:12238-12241 has redundant first/third branches that both return the same value:
```cpp
const double comfortMargin =
revealOffscreen ? kRevealComfortEdgeMarginFrac // <-- same...
: isSpectrumClick ? kSpectrumClickEdgeMarginFrac
: kRevealComfortEdgeMarginFrac; // <-- ...as this
```
Proposed cleanup
Collapse to:
```cpp
const double comfortMargin = isSpectrumClick
? kSpectrumClickEdgeMarginFrac
: kRevealComfortEdgeMarginFrac;
```
The revealOffscreen variable is still needed for triggerEdgeMarginFrac a few lines later, so leave the computation in place — just drop it from the comfortMargin ternary.
Pull the explanatory comment forward from #3030 with a note that off-screen-indicator clicks share the default reveal margin, since the explicit branch is going away.
Why this is a follow-up, not a fix-up to #3030
Effort
~2 minutes. Single-file, single-hunk, no test impact.
Background
After PR #3030 (fix for #2941) changed the
revealOffscreenbranch to returnkRevealComfortEdgeMarginFracinstead of0.0, the ternary at src/gui/MainWindow.cpp:12238-12241 has redundant first/third branches that both return the same value:```cpp
const double comfortMargin =
revealOffscreen ? kRevealComfortEdgeMarginFrac // <-- same...
: isSpectrumClick ? kSpectrumClickEdgeMarginFrac
: kRevealComfortEdgeMarginFrac; // <-- ...as this
```
Proposed cleanup
Collapse to:
```cpp
const double comfortMargin = isSpectrumClick
? kSpectrumClickEdgeMarginFrac
: kRevealComfortEdgeMarginFrac;
```
The
revealOffscreenvariable is still needed fortriggerEdgeMarginFraca few lines later, so leave the computation in place — just drop it from thecomfortMarginternary.Pull the explanatory comment forward from #3030 with a note that off-screen-indicator clicks share the default reveal margin, since the explicit branch is going away.
Why this is a follow-up, not a fix-up to #3030
Effort
~2 minutes. Single-file, single-hunk, no test impact.