fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

ImageFill brush does not redraw on top of a brush passed in as ux:Property to a class #315

Open eksperts opened 7 years ago

eksperts commented 7 years ago

Reported on community.

macOS, Fuse 1.1.1 build 13893. Affected: all previews and builds, incl. uno build -tdotnet -r.

Repro:

<App>
    <Grid ux:Class="UserCollection" Rows="auto,1*" Width="116" Height="190" Margin="16,0,0,10" EmptyColor="#e8e8e8">
        <float4 ux:Property="EmptyColor" />
        <WrapPanel ItemWidth="58" ItemHeight="45">
            <Rectangle Color="{ReadProperty EmptyColor}" CornerRadius="10,0,0,0">
                <ImageFill Url="https://unsplash.it/58/45?image=12" />
            </Rectangle>
            <Rectangle Color="#e8e8e8" CornerRadius="0,10,0,0" Margin="1,0,0,0">
                <ImageFill Url="https://unsplash.it/58/45?image=12" />
            </Rectangle>
        </WrapPanel>
    </Grid>

    <ClientPanel>
        <JavaScript>
        var collections = [{id: 1, name: 'Cofee'}, {id: 2, name: 'Books'}, {id: 3, name: 'Cars'}];
        module.exports = {
            collections: collections
        }
        </JavaScript>
        <StackPanel Orientation="Horizontal">
            <Each Items="{collections}">
                <UserCollection EmptyColor="#f00" />
            </Each>
        </StackPanel>
    </ClientPanel>
</App>

Both Rectangles on lines 5 and 8 are expected to show the image when it loads. Second does the job, first one stays red. Refresh doesn't have an effect.

fusebuild commented 7 years ago

The forum thread Rectangle do not display ImageFill image when reading Color via ReadProperty posted by poul.kg@gmail.com was linked to this issue.

eksperts commented 7 years ago

Same thing here? https://www.fusetools.com/community/forums/howto_discussions/rectangle_color_and_imagefill

eksperts commented 6 years ago

Same thing here? https://www.fusetools.com/community/forums/bug_reports/overwriting_of_default_value_not_possible