ui.gadgets.panes: simplify <styled-label>.

master
John Benediktsson 2020-02-25 12:33:01 -08:00
parent 94fcf3f2b6
commit c03a7b5ec2
1 changed files with 6 additions and 8 deletions

View File

@ -338,14 +338,12 @@ M: pane-stream stream-write-table
swap " " <word-break-gadget> apply-character-style add-gadget drop ; swap " " <word-break-gadget> apply-character-style add-gadget drop ;
: <styled-label> ( style text -- gadget ) : <styled-label> ( style text -- gadget )
[
<label> <label>
apply-font-style apply-font-style
apply-background-style apply-background-style
apply-image-style apply-image-style
] keep [ blank? ] all? [
apply-presentation-style apply-presentation-style
] unless nip ; nip ;
: pane-text ( string style gadget -- ) : pane-text ( string style gadget -- )
[ swap <styled-label> ] [ swap add-gadget drop ] bi* ; [ swap <styled-label> ] [ swap add-gadget drop ] bi* ;