diff options
| author | Po Lu | 2024-05-30 21:31:18 +0800 |
|---|---|---|
| committer | Po Lu | 2024-05-30 21:31:50 +0800 |
| commit | 1ebb9cb93b2fefa84f18a63fb24c1ed4fcf095a7 (patch) | |
| tree | 3fd7a4b3ebed34871961236c63eda6b8e6b9ef15 | |
| parent | 1fdf0f68ccf02cc92e4fb995f82f01a6148b62e7 (diff) | |
| download | emacs-1ebb9cb93b2fefa84f18a63fb24c1ed4fcf095a7.tar.gz emacs-1ebb9cb93b2fefa84f18a63fb24c1ed4fcf095a7.zip | |
Don't set text scale to fractional values in touch-screen-pinch
* lisp/touch-screen.el (touch-screen-pinch): Take floor of
computed scale.
| -rw-r--r-- | lisp/touch-screen.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el index ca02ca3caf6..436b8d0954c 100644 --- a/lisp/touch-screen.el +++ b/lisp/touch-screen.el | |||
| @@ -937,8 +937,8 @@ text scale by the ratio therein." | |||
| 937 | (aset touch-screen-aux-tool 7 | 937 | (aset touch-screen-aux-tool 7 |
| 938 | current-scale))) | 938 | current-scale))) |
| 939 | ;; Set the text scale. | 939 | ;; Set the text scale. |
| 940 | (text-scale-set (+ start-scale | 940 | (text-scale-set (floor (+ (round (log scale text-scale-mode-step)) |
| 941 | (round (log scale text-scale-mode-step)))) | 941 | start-scale))) |
| 942 | ;; Subsequently move the row which was at the centrum to its Y | 942 | ;; Subsequently move the row which was at the centrum to its Y |
| 943 | ;; position. | 943 | ;; position. |
| 944 | (if (and (not (eq current-scale | 944 | (if (and (not (eq current-scale |