Set DUALSIZE remains highlighted when split proportions change

When a button contains Set DUALSIZE 50 and that button is pressed, the button remains highlighted even if the proportions of the dual display split are manually changed slightly, say to ~47/53. After a certain threshold, the button stops being highlighted, but that threshold should be more precise: anything other than a 50/50 split.

This can be demonstrated further by adding a second button containing Set DUALSIZE 53: when changing the split proportions manually, it's possible for both buttons to be highlighted at once. Which is it? Neither, at least in terms of when either is pressed, the split will make a small adjustment according to the defined DUALSIZE value.

System information:

- Directory Opus v12.23.1 Beta x64 Build 7710
- Microsoft Windows 10 v20H2 OS Build 19042.804

I'm surprised it highlights at all. It may just be indicating that the lister is in dual display mode?

Toolbar button states aren't refreshed when the window or panels within it are resized. That would cause a big performance hit.

I was surprised too, and it's what made me curious.

If that were the case, I would think it'd remain highlighted no matter the proportions of the split. Only when the proportions are close to 50/50 does it highlight (for DUALSIZE 50).

That may be the intended behaviour, but if I understand correctly, that's exactly what's happening. The highlight doesn't update during the drag, only when the divider is "dropped" at its new position.

Looking at the code, it'll highlight a Set DUALSIZE=x button when the size is within +/- 1% of the specified size, plus some rounding to get to integer percentages.

I haven't checked when those buttons get updated, but that explains the highlighting. It has to do some rounding and allow close but unexact values, else it'd potentially never highlight even right after pushing the button (since an exact 50% may not be possible, or may be thrown off slightly when the window is resized). That's by design, at least.