ui.gadgets.panes: simplify <styled-label>.
parent
94fcf3f2b6
commit
c03a7b5ec2
|
@ -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
|
apply-presentation-style
|
||||||
] keep [ blank? ] all? [
|
nip ;
|
||||||
apply-presentation-style
|
|
||||||
] unless 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* ;
|
||||||
|
|
Loading…
Reference in New Issue