| 1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
| 2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 |
| 3 | |
| 4 | import { StyleMetrics } from "std-widgets.slint" ; |
| 5 | |
| 6 | export Xxx := Rectangle { |
| 7 | color: white; |
| 8 | // ^warning{The property 'color' has been deprecated. Please use 'background' instead} |
| 9 | |
| 10 | r := Rectangle { |
| 11 | background: root.color; |
| 12 | // ^warning{The property 'color' has been deprecated. Please use 'background' instead} |
| 13 | animate color { |
| 14 | // ^warning{The property 'color' has been deprecated. Please use 'background' instead} |
| 15 | duration: 250ms; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | minimum-height: root.maximum-width; |
| 20 | // ^warning{The property 'minimum-height' has been deprecated. Please use 'min-height' instead} |
| 21 | // ^^warning{The property 'maximum-width' has been deprecated. Please use 'max-width' instead} |
| 22 | |
| 23 | callback not_called; |
| 24 | not_called() => { |
| 25 | color = #000000; |
| 26 | // ^warning{The property 'color' has been deprecated. Please use 'background' instead} |
| 27 | |
| 28 | debug(StyleMetrics.dark-color-scheme); |
| 29 | // ^warning{The property 'dark-color-scheme' has been deprecated. Please use 'Palette.dark-color-scheme' instead} |
| 30 | |
| 31 | // not deprecated |
| 32 | debug(StyleMetrics.layout-padding, StyleMetrics.layout-padding); |
| 33 | |
| 34 | background = StyleMetrics.window-background; |
| 35 | // ^warning{The property 'window-background' has been deprecated. Please use 'Palette.window-background' instead} |
| 36 | |
| 37 | // Not really a deprecation test, but handled in the same function :) |
| 38 | debug(StyleMetrics.style-name); |
| 39 | // ^error{'StyleMetrics' does not have a property 'style-name'} |
| 40 | } |
| 41 | |
| 42 | } |
| 43 | |