live-preview: Add function icon for complex mode in property editor

This commit is contained in:
Tobias Hunger 2024-07-09 13:03:41 +02:00 committed by Tobias Hunger
parent 05e0b4dc68
commit 2c546fc35f
3 changed files with 5 additions and 5 deletions

View file

@ -76,7 +76,7 @@ Files: api/node/__test__/resources/*.png
Copyright: Copyright © SixtyFPS GmbH <info@slint.dev>
License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
Files: examples/carousel/icons/*.svg
Files: examples/carousel/icons/*.svg tools/lsp/ui/asserts/*.svg
Copyright: Material Icons <https://fonts.google.com/icons?selected=Material+Iconse>
License: Apache-2.0

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M412.31-260v-40h51.23l121.92-140-121.92-140h-76.77l-64 327.85q-11.08 57.3-35.08 84.73-24 27.42-62.84 27.42-35 0-57.62-19.38-22.61-19.39-22.61-50.93 0-22 11.23-35.34Q167.08-259 184.62-259q16.53 0 28.26 11.62 11.74 11.61 11.74 27.92 0 11.15-6.66 19.38-6.65 8.23-16.11 10.16 3.84 3.84 10.77 6.54 6.92 2.69 15.38 2.69 21.15-.23 34.27-18.58 13.11-18.35 21.27-57.88L346.31-580H227.69v-40h125.93l19.46-104.77q8.54-46.46 32.11-70.85Q428.77-820 465.38-820q34.77 0 57.39 20.23 22.61 20.23 22.61 51.54 0 21.54-11.23 34.88Q522.92-700 505.38-700q-16.53 0-28.26-11.23-11.74-11.23-11.74-27.77 0-11.15 6.66-19.38 6.65-8.24 16.88-10.16-3.84-4.61-11.92-7.69t-16.54-3.08q-19.08.46-30.92 16-11.85 15.54-17.69 45.85l-17 97.46h177.46v40h-55.85l95.85 109.77L708.15-580h-55.84v-40h160v40h-51.23L639.15-440l122.7 140h50.46v40h-160v-40h55.84l-95.84-110-95.85 110h55.85v40h-160Z"/></svg>

After

Width:  |  Height:  |  Size: 976 B

View file

@ -82,12 +82,11 @@ export component PropertyEditor inherits SideBarElement {
complexity-icon := TouchArea {
width: complexity-icon-icon.width;
complexity-icon-icon := Text {
complexity-icon-icon := Image {
width: self.preferred-width;
vertical-alignment: center;
color: property-row.text-foreground;
colorize: property-row.is-simple ? Palette.foreground.transparentize(0.7) : Palette.foreground;
text: property-row.is-simple ? "S" : "K";
source: @image-url("assets/function.svg");
}
clicked() => { property-row.force-to-complex = !property-row.force-to-complex; }