slint/internal/compiler/widgets/common/standardbutton.slint
Olivier Goffart 7947d44e59 Run the syntax_updater on our widgets
This is commit is just the output of running the syntax updater on the
files in the internal/compiler/widgets directory.
No extra manual steps were done.

Note: In order to run the updater, I did a hack so that the updater wouldn't
choke on internal item used by the styles by commenting out the check in
ElementType::lookup_type_for_child_element
2023-01-11 10:52:48 +01:00

20 lines
920 B
Text

// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
import { StyleMetrics, Button } from "std-widgets-impl.slint";
export component StandardButton inherits Button {
in property <StandardButtonKind> kind;
text:
root.kind == StandardButtonKind.ok ? "OK" :
root.kind == StandardButtonKind.cancel ? "Cancel" :
root.kind == StandardButtonKind.apply ? "Apply" :
root.kind == StandardButtonKind.close ? "Close" :
root.kind == StandardButtonKind.reset ? "Reset" :
root.kind == StandardButtonKind.help ? "Help" :
root.kind == StandardButtonKind.yes ? "Yes" :
root.kind == StandardButtonKind.no ? "No" :
root.kind == StandardButtonKind.abort ? "Abort" :
root.kind == StandardButtonKind.retry ? "Retry" :
root.kind == StandardButtonKind.ignore ? "Ignore" : "";
}