1 | // use inside of jAutoWidthHTMLLabel |
2 | // pairs: (HTML text, false=left/true=right) |
3 | // sadly, no padding possible with this div/span arrangement |
4 | sS htmlForJLabel_chatConvo(LPair<S, Bool> dialog) { |
5 | ret lines(mapPairsToList(dialog, (content, right) -> { |
6 | S color = right ? "#9999FF" : "#99FF99"; |
7 | ret div(span(content, style := "background: \*color*/"), |
8 | style := "margin-bottom: 10px; margin-" + (right ? "left" : "right") + ": 20px" + (right ? "; text-align: right" : "")); |
9 | })); |
10 | } |
Began life as a copy of #1026592
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026598 |
Snippet name: | htmlForJLabel_chatConvo (old version with divs) |
Eternal ID of this version: | #1026598/1 |
Text MD5: | 832b1e1b72ce465c0717b0abd8e3e0e9 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-15 14:50:24 |
Source code size: | 502 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 199 / 225 |
Referenced in: | [show references] |