IconStyle
Defines the color
and icon_size
of an icon.
Fields
foreground
(brush): Defines the color of the icon. (default value: black)icon_size
(relative_font_size): Defines the height of the icon. (default value: 0)
IconBase
The IconBase
represents the base for icon elements that can be styled by using IconStyle
.
Properties
style
(in IconStyle): Used to setcolor
andheight
of the icon.icon
(in image): The image source of the icon.
Example
import { IconBase } from "@vivi/foundation.slint";
export component MyIcon inherits IconBase {
style: {
foreground: black,
icon_size: 12px,
};
}
export component Example inherits Window {
width: 200px;
height: 100px;
MyIcon {
icon: @image-url("my-icon.svg");
}
}