▾ modified src/frq/app.jolt +11 -2 Viewed
@@ -632,10 +632,19 @@ 632 632 633 633 Clamped at both ends, and falling back to the old fixed height until the 634 634 first poll has landed: a preview is a preview either way, and the lightbox 635 - is what full size is for." 635 + is what full size is for. 636 + 637 + A terminal gets less of its screen, and a hard ceiling on top of that. Four 638 + fifths of a window is a picture you look at; four fifths of a terminal is a 639 + conversation with one message in it, and the rows a picture takes are rows 640 + that cannot hold a line. Twelve of them is enough to see what a picture is 641 + of, and to decide whether to open it." 636 642 [] 637 643 (let [h @s/window-height] 638 - (if (pos? h) (min 900 (max 240 (long (* 0.8 h)))) 260))) 644 + (cond 645 + (not (pos? h)) 260 646 + @terminal? (max 80 (min 192 (long (* 0.4 h)))) 647 + :else (min 900 (max 240 (long (* 0.8 h))))))) 639 648 640 649 (defn- preview-width 641 650 "How wide a picture in the conversation may be.
@@ -632,10 +632,19 @@ 632 632 633 Clamped at both ends, and falling back to the old fixed height until the 633 Clamped at both ends, and falling back to the old fixed height until the 634 first poll has landed: a preview is a preview either way, and the lightbox 634 first poll has landed: a preview is a preview either way, and the lightbox 635 - is what full size is for." 635 + is what full size is for. 636 + 637 + A terminal gets less of its screen, and a hard ceiling on top of that. Four 638 + fifths of a window is a picture you look at; four fifths of a terminal is a 639 + conversation with one message in it, and the rows a picture takes are rows 640 + that cannot hold a line. Twelve of them is enough to see what a picture is 641 + of, and to decide whether to open it." 636 [] 642 [] 637 (let [h @s/window-height] 643 (let [h @s/window-height] 638 - (if (pos? h) (min 900 (max 240 (long (* 0.8 h)))) 260))) 644 + (cond 645 + (not (pos? h)) 260 646 + @terminal? (max 80 (min 192 (long (* 0.4 h)))) 647 + :else (min 900 (max 240 (long (* 0.8 h))))))) 639 648 640 (defn- preview-width 649 (defn- preview-width 641 "How wide a picture in the conversation may be. 650 "How wide a picture in the conversation may be.