diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-27 22:37:31 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-27 22:51:54 +0100 |
| commit | 1e8169ea94da3c37fc8fbe38ccb8120ae540743a (patch) | |
| tree | 80294e25bcdda966465ad9eac798d878c8c99b13 /html | |
| parent | fa58dd85b7ee06fed8d7a5ecc14fda8146f7521b (diff) | |
| download | puzzles-1e8169ea94da3c37fc8fbe38ccb8120ae540743a.zip puzzles-1e8169ea94da3c37fc8fbe38ccb8120ae540743a.tar.gz puzzles-1e8169ea94da3c37fc8fbe38ccb8120ae540743a.tar.bz2 puzzles-1e8169ea94da3c37fc8fbe38ccb8120ae540743a.tar.xz | |
js: Take device pixel ratio into account when setting default size
This is a bit of a hack. When setting the puzzle to its default size,
either at startup or from a right-click on the resize handle, we now
scale the default size from midend_size() by the device pixel ratio,
and then pass that back to midend_size(). This does more or less the
right thing, in that the puzzle now starts up at a size that scales
with the font size.
There are still some slight inconsistencies, where sequences of DPR
changes and puzzle parameter changes can have order-dependent effects
on the size of the puzzle. Happily these effects are small and fairly
hard to observe.
Diffstat (limited to 'html')
0 files changed, 0 insertions, 0 deletions