slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.25k stars 581 forks source link

`dialog-button-role` possible on `StandardButton` #6556

Open Enyium opened 3 days ago

Enyium commented 3 days ago

Consider this SlintPad demo:

import { StandardButton } from "std-widgets.slint";

export component Dlg inherits Dialog {
    Text {
        text: "[Dialog content]";
    }

    StandardButton {
        kind: ok;
        dialog-button-role: reject;
    }
}

It doesn't generate an error. This is contradictory and should probably be forbidden.

ogoffart commented 2 days ago

Thanks for the bug report. You're right that this is contradictory, but i don't think it is worth to forbid it. At best there could be a warning that dialog-button-role shouldn't be necessary