Put the picture button on a Delight 2 tile
The compose row's 🖼 was a colour photo that matched nothing else in the bar. In a window it is now a picture glyph on the tile delight-icons generates for apps — grey frame, dark square, cream symbol — drawn as an :image that opens the same chooser. src/frq/icons carries the SVG and the PNG rendered from it. A terminal has no pixels for it and an APK carries no src/ to read it from, so both keep the glyph button. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
9a98b31 parent: 7b594b1 modified
src/frq/app.clj +15 -1 | @@ -1548,7 +1548,21 @@ | ||
| 1548 | 1548 | ;; something else on it". |
| 1549 | 1549 | ;; And the same picture chosen rather than pasted, for a phone — which has |
| 1550 | 1550 | ;; no Ctrl+V, and no clipboard of pictures to read if it had. |
| 1551 | - [:button {:label "🖼" :on-click s/open-image-picker!}] | |
| 1551 | + ;; In a window, a picture on a Delight 2 tile (src/frq/icons, on the | |
| 1552 | + ;; geometry delight-icons generates its tiles with): grey frame, dark | |
| 1553 | + ;; square, cream glyph — where the emoji was a colour photo that matched | |
| 1554 | + ;; nothing else in the bar. Its path is read from the working directory, | |
| 1555 | + ;; which is the tree under `just run` and `just cosmic` and the store | |
| 1556 | + ;; copy under the flake's launcher. A terminal has no pixels to put | |
| 1557 | + ;; it in, and an APK carries no src/ to read it from — both keep the glyph. | |
| 1558 | + (if (and (platform/desktop?) (not @terminal?)) | |
| 1559 | + [:image {:src "src/frq/icons/insert-image.png" | |
| 1560 | + :size [36 36] | |
| 1561 | + ;; for a backend that sizes a picture by its bounds instead | |
| 1562 | + :max-width 36 | |
| 1563 | + :max-height 36 | |
| 1564 | + :on-click s/open-image-picker!}] | |
| 1565 | + [:button {:label "🖼" :on-click s/open-image-picker!}]) | |
| 1552 | 1566 | ;; In a terminal the row is the width of the screen and a message is |
| 1553 | 1567 | ;; longer than 260 points of it: the field takes the surplus and wraps |
| 1554 | 1568 | ;; into three rows rather than scrolling one line sideways. |
| @@ -1548,7 +1548,21 @@ | |||
| 1548 | ;; something else on it". | 1548 | ;; something else on it". |
| 1549 | ;; And the same picture chosen rather than pasted, for a phone — which has | 1549 | ;; And the same picture chosen rather than pasted, for a phone — which has |
| 1550 | ;; no Ctrl+V, and no clipboard of pictures to read if it had. | 1550 | ;; no Ctrl+V, and no clipboard of pictures to read if it had. |
| 1551 | - [:button {:label "🖼" :on-click s/open-image-picker!}] | 1551 | + ;; In a window, a picture on a Delight 2 tile (src/frq/icons, on the |
| 1552 | + ;; geometry delight-icons generates its tiles with): grey frame, dark | ||
| 1553 | + ;; square, cream glyph — where the emoji was a colour photo that matched | ||
| 1554 | + ;; nothing else in the bar. Its path is read from the working directory, | ||
| 1555 | + ;; which is the tree under `just run` and `just cosmic` and the store | ||
| 1556 | + ;; copy under the flake's launcher. A terminal has no pixels to put | ||
| 1557 | + ;; it in, and an APK carries no src/ to read it from — both keep the glyph. | ||
| 1558 | + (if (and (platform/desktop?) (not @terminal?)) | ||
| 1559 | + [:image {:src "src/frq/icons/insert-image.png" | ||
| 1560 | + :size [36 36] | ||
| 1561 | + ;; for a backend that sizes a picture by its bounds instead | ||
| 1562 | + :max-width 36 | ||
| 1563 | + :max-height 36 | ||
| 1564 | + :on-click s/open-image-picker!}] | ||
| 1565 | + [:button {:label "🖼" :on-click s/open-image-picker!}]) | ||
| 1552 | ;; In a terminal the row is the width of the screen and a message is | 1566 | ;; In a terminal the row is the width of the screen and a message is |
| 1553 | ;; longer than 260 points of it: the field takes the surplus and wraps | 1567 | ;; longer than 260 points of it: the field takes the surplus and wraps |
| 1554 | ;; into three rows rather than scrolling one line sideways. | 1568 | ;; into three rows rather than scrolling one line sideways. |
added
src/frq/icons/insert-image.png +0 -0 | new file mode 100644 | ||
| Binary files /dev/null and b/src/frq/icons/insert-image.png differ | ||
| new file mode 100644 | |||
| Binary files /dev/null and b/src/frq/icons/insert-image.png differ | Binary files /dev/null and b/src/frq/icons/insert-image.png differ | ||
added
src/frq/icons/insert-image.svg +18 -0 | new file mode 100644 | ||
| @@ -0,0 +1,18 @@ | ||
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1.1"> | |
| 2 | + <!-- Delight 2 tile, geometry from delight-icons (gitlab.com/nandithebull/delight-icons); cream picture glyph --> | |
| 3 | + <defs> | |
| 4 | + <filter id="blur" style="color-interpolation-filters:sRGB" x="-0.0913" y="-0.0913" width="1.1827" height="1.1827"> | |
| 5 | + <feGaussianBlur stdDeviation="1.3 1.3"/> | |
| 6 | + </filter> | |
| 7 | + </defs> | |
| 8 | + <g transform="matrix(1.1,0,0,1.1,-3.1845928,-3.2065454)"> | |
| 9 | + <rect style="fill:none;stroke:#000000;stroke-width:2.72727;filter:url(#blur);opacity:0.5" width="49.090908" height="49.090908" x="7.4405394" y="7.4604964" rx="7.4768682" ry="7.477273"/> | |
| 10 | + <rect style="fill:#c4c2c5;stroke:#1e2430;stroke-width:2.72727273" width="49.090908" height="49.090908" x="7.4405394" y="7.4604964" rx="7.4768682" ry="7.477273"/> | |
| 11 | + <rect style="fill:#1e2430;stroke:none" width="42.089317" height="42.089317" x="10.941335" y="10.961291" rx="5.5927272" ry="5.5927272"/> | |
| 12 | + <g fill="#f4e3cf"> | |
| 13 | + <path fill-rule="evenodd" d="M20.5 19.5 h23 a4 4 0 0 1 4 4 v17 a4 4 0 0 1 -4 4 h-23 a4 4 0 0 1 -4 -4 v-17 a4 4 0 0 1 4 -4 Z M20.8 22.4 a1.3 1.3 0 0 0 -1.3 1.3 v16.6 a1.3 1.3 0 0 0 1.3 1.3 h22.4 a1.3 1.3 0 0 0 1.3 -1.3 v-16.6 a1.3 1.3 0 0 0 -1.3 -1.3 Z"/> | |
| 14 | + <circle cx="37.8" cy="28.2" r="2.8"/> | |
| 15 | + <path d="M21.5 39.6 L28.3 30.4 Q29.2 29.3 30.1 30.4 L34.4 35.8 L36.6 33.2 Q37.4 32.3 38.2 33.2 L42.5 39.6 Z"/> | |
| 16 | + </g> | |
| 17 | + </g> | |
| 18 | +</svg> | |
| new file mode 100644 | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1.1"> | ||
| 2 | + <!-- Delight 2 tile, geometry from delight-icons (gitlab.com/nandithebull/delight-icons); cream picture glyph --> | ||
| 3 | + <defs> | ||
| 4 | + <filter id="blur" style="color-interpolation-filters:sRGB" x="-0.0913" y="-0.0913" width="1.1827" height="1.1827"> | ||
| 5 | + <feGaussianBlur stdDeviation="1.3 1.3"/> | ||
| 6 | + </filter> | ||
| 7 | + </defs> | ||
| 8 | + <g transform="matrix(1.1,0,0,1.1,-3.1845928,-3.2065454)"> | ||
| 9 | + <rect style="fill:none;stroke:#000000;stroke-width:2.72727;filter:url(#blur);opacity:0.5" width="49.090908" height="49.090908" x="7.4405394" y="7.4604964" rx="7.4768682" ry="7.477273"/> | ||
| 10 | + <rect style="fill:#c4c2c5;stroke:#1e2430;stroke-width:2.72727273" width="49.090908" height="49.090908" x="7.4405394" y="7.4604964" rx="7.4768682" ry="7.477273"/> | ||
| 11 | + <rect style="fill:#1e2430;stroke:none" width="42.089317" height="42.089317" x="10.941335" y="10.961291" rx="5.5927272" ry="5.5927272"/> | ||
| 12 | + <g fill="#f4e3cf"> | ||
| 13 | + <path fill-rule="evenodd" d="M20.5 19.5 h23 a4 4 0 0 1 4 4 v17 a4 4 0 0 1 -4 4 h-23 a4 4 0 0 1 -4 -4 v-17 a4 4 0 0 1 4 -4 Z M20.8 22.4 a1.3 1.3 0 0 0 -1.3 1.3 v16.6 a1.3 1.3 0 0 0 1.3 1.3 h22.4 a1.3 1.3 0 0 0 1.3 -1.3 v-16.6 a1.3 1.3 0 0 0 -1.3 -1.3 Z"/> | ||
| 14 | + <circle cx="37.8" cy="28.2" r="2.8"/> | ||
| 15 | + <path d="M21.5 39.6 L28.3 30.4 Q29.2 29.3 30.1 30.4 L34.4 35.8 L36.6 33.2 Q37.4 32.3 38.2 33.2 L42.5 39.6 Z"/> | ||
| 16 | + </g> | ||
| 17 | + </g> | ||
| 18 | +</svg> | ||