| @@ -1205,10 +1205,13 @@ |
| 1205 | ;; any of it and the column runs past the bottom edge, which does not show as | 1205 | ;; any of it and the column runs past the bottom edge, which does not show as |
| 1206 | ;; a list that is too long: it shows as a compose bar sitting flat on the | 1206 | ;; a list that is too long: it shows as a compose bar sitting flat on the |
| 1207 | ;; bottom of the window with its margin cut off. | 1207 | ;; bottom of the window with its margin cut off. |
| 1208 | - (* (chrome-scale) | 1208 | + (+ (* (chrome-scale) |
| 1209 | - (+ 140 | 1209 | + (+ 140 |
| 1210 | - (if @s/replying-to 34 0) | 1210 | + (if @s/replying-to 34 0) |
| 1211 | - (if @s/attachment 76 0)))) | 1211 | + (if @s/attachment 76 0))) |
| | 1212 | + ;; The two extra rows the terminal's compose field wraps into, in points: |
| | 1213 | + ;; a row down the page is two cells' worth of the scale. |
| | 1214 | + (if @terminal? (* 4 (chrome-scale)) 0))) |
| 1212 | | 1215 | |
| 1213 | (defn- messages-width | 1216 | (defn- messages-width |
| 1214 | "How wide the message list may be with the people panel beside it. | 1217 | "How wide the message list may be with the people panel beside it. |
| @@ -1442,8 +1445,13 @@ |
| 1442 | ;; And the same picture chosen rather than pasted, for a phone — which has | 1445 | ;; And the same picture chosen rather than pasted, for a phone — which has |
| 1443 | ;; no Ctrl+V, and no clipboard of pictures to read if it had. | 1446 | ;; no Ctrl+V, and no clipboard of pictures to read if it had. |
| 1444 | [:button {:label "🖼" :on-click s/open-image-picker!}] | 1447 | [:button {:label "🖼" :on-click s/open-image-picker!}] |
| | 1448 | + ;; In a terminal the row is the width of the screen and a message is |
| | 1449 | + ;; longer than 260 points of it: the field takes the surplus and wraps |
| | 1450 | + ;; into three rows rather than scrolling one line sideways. |
| 1445 | [:entry {:text @s/draft | 1451 | [:entry {:text @s/draft |
| 1446 | :width-request 260 | 1452 | :width-request 260 |
| | 1453 | + :hexpand @terminal? |
| | 1454 | + :rows (if @terminal? 3 1) |
| 1447 | :placeholder "Message" | 1455 | :placeholder "Message" |
| 1448 | :on-change #(reset! s/draft %) | 1456 | :on-change #(reset! s/draft %) |
| 1449 | :on-paste-empty s/paste-image! | 1457 | :on-paste-empty s/paste-image! |