pharo-spec / Spec

Spec is a framework in Pharo for describing user interfaces.
MIT License
62 stars 65 forks source link

The border color specified in a stylesheet is not applied to an image presenter #1649

Open koendehondt opened 1 week ago

koendehondt commented 1 week ago

Try this in a Playground:

application := SpApplication new
    addStyleSheetFromString: '.application [
        .yellowBorder [
            Draw { #backgroundColor: #green},
            Container { #borderColor: #yellow, #borderWidth: 3 } ]
    ]';
    yourself.
presenter := SpPresenter newApplication: application.
image := presenter newImage
    image: (self iconNamed: #grayCircle);
    addStyle: 'yellowBorder';
    yourself.
layout := SpBoxLayout newTopToBottom
    vAlignCenter;
    hAlignCenter;
    add: image;
    yourself.
presenter layout: layout.
presenter open

This snippet opens this window:

Screenshot 2024-11-13 at 12 46 18

Expected and ok:

Expected, but not ok: