Skip to content

Commit

Permalink
FEAT: [VID] smarter merging of actors in a style with custom actors i…
Browse files Browse the repository at this point in the history
…n the instance.

Use-case example:

    view [
        style but: base
            on-down [face/color: face/color / 2 do-actor face event 'click]
            on-up   [face/color: face/color * 2]

        but red on-click [print "hi"]
    ]
  • Loading branch information
dockimbel committed Jan 3, 2019
1 parent be5e25d commit 80f208d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/view/VID.red
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,11 @@ system/view/VID: context [
if none? face-font/:field [face-font/:field: get value]
]
]
if all [block? face/actors block? actors: opts/actors][
foreach [name f s b] face/actors [
unless find actors name [repend actors [name f s b]]
]
]

set/some face opts ;-- merge default+styles and user options

Expand Down

0 comments on commit 80f208d

Please sign in to comment.