slint icon indicating copy to clipboard operation
slint copied to clipboard

Live-preview layouts sometimes don't update

Open NigelBreslaw opened this issue 6 months ago • 3 comments
trafficstars

Bug Description

In the example below change line 17 from preferred-width: 50px to preferred-width: 100%. Often the live-preview won't update till you click refresh. Then undoing it sometimes won't update without an explicitly press of refresh.

Reproducible Code (if applicable)

export component ExportedComponent {

    Rectangle {
        VerticalLayout {
            alignment: stretch;
            Rectangle {
                preferred-width: 100%;
                height: 50px;
                background: red;
            }
            Rectangle {
                preferred-width: 100%;
                height: 50px;
                background: blue;
            }
            Rectangle {
                preferred-width: 50px;
                height: 50px;
                background: green;
            }
        }
    }
}

Environment Details

  • Slint Version: 1.11
  • Platform/OS: Mac and Slintpad
  • Programming Language:
  • Backend/Renderer: Skia and SW

Product Impact

It's confusing when the live-preview is not updating and showing a UI that reflects the current code. Layouts are tricky enough without the tooling giving a false impression that a change has not impacted the end result.

NigelBreslaw avatar Apr 24 '25 12:04 NigelBreslaw