nandi/frqpublic Fork 0
58be94a
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Give the terminal's compose bar the width and three rows

A window's entry asks for 260 points and scrolls one line sideways; in a
terminal that is a third of the row with the rest of it empty. So the field
takes the surplus and wraps into three rows there, and the strip under the
backlog reserves the two extra rows it grew by.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-08T15:44:05-07:00 Browse files
58be94a parent: 3c3a947
modified src/frq/app.clj +12 -4
@@ -1205,10 +1205,13 @@
12051205 ;; any of it and the column runs past the bottom edge, which does not show as
12061206 ;; a list that is too long: it shows as a compose bar sitting flat on the
12071207 ;; bottom of the window with its margin cut off.
1208- (* (chrome-scale)
1209- (+ 140
1210- (if @s/replying-to 34 0)
1211- (if @s/attachment 76 0))))
1208+ (+ (* (chrome-scale)
1209+ (+ 140
1210+ (if @s/replying-to 34 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)))
12121215
12131216 (defn- messages-width
12141217 "How wide the message list may be with the people panel beside it.
@@ -1442,8 +1445,13 @@
14421445 ;; And the same picture chosen rather than pasted, for a phone — which has
14431446 ;; no Ctrl+V, and no clipboard of pictures to read if it had.
14441447 [: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.
14451451 [:entry {:text @s/draft
14461452 :width-request 260
1453+ :hexpand @terminal?
1454+ :rows (if @terminal? 3 1)
14471455 :placeholder "Message"
14481456 :on-change #(reset! s/draft %)
14491457 :on-paste-empty s/paste-image!
@@ -1205,10 +1205,13 @@
1205 ;; any of it and the column runs past the bottom edge, which does not show as1205 ;; 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 the1206 ;; 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- (+ 1401209+ (+ 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-width1216 (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 has1445 ;; 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/draft1451 [:entry {:text @s/draft
1446 :width-request 2601452 :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!