mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-12-01 17:32:52 +03:00
Core.hyperlink: use attrL rather than duplicating context attribute lookup
This commit is contained in:
parent
c1bce6a434
commit
4ad3ffb5a2
@ -373,7 +373,7 @@ hyperlink :: T.Text -> Widget n -> Widget n
|
||||
hyperlink url p =
|
||||
Widget (hSize p) (vSize p) $ do
|
||||
c <- getContext
|
||||
let attr = attrMapLookup (c^.ctxAttrNameL) (c^.ctxAttrMapL) `V.withURL` url
|
||||
let attr = c^.attrL `V.withURL` url
|
||||
withReaderT (ctxAttrMapL %~ setDefaultAttr attr) (render p)
|
||||
|
||||
-- | Pad the specified widget on the left. If max padding is used, this
|
||||
|
Loading…
Reference in New Issue
Block a user