File tree Expand file tree Collapse file tree
docs/astro/src/content/docs/reference/std-widgets/views
internal/compiler/widgets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ The size of the font of the input text.
3939The name of the font family selected for rendering the text.
4040</SlintProperty >
4141
42+ ### font-italic
43+ <SlintProperty propName = " font-italic" typeName = " bool" defaultValue = " false" >
44+ The italic state of the font of the input text
45+ </SlintProperty >
46+
4247### text
4348<SlintProperty propName = " text" typeName = " string" propertyVisibility = " in-out" >
4449The text being edited
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export component TextEditBase inherits Rectangle {
1111 in property <bool > read-only <=> text-input.read-only;
1212 in property <length > font-size <=> text-input.font-size;
1313 in property <string > font-family <=> text-input.font-family;
14+ in property <bool > font-italic <=> text-input.font-italic;
1415 in property <bool > enabled <=> text-input.enabled;
1516 out property <bool > has-focus : text-input.has-focus;
1617 out property <length > visible-width <=> scroll-view.visible-width;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export component TextEdit {
1111 in property <bool > read-only <=> base.read-only;
1212 in property <length > font-size <=> base.font-size;
1313 in property <string > font-family <=> base.font-family;
14+ in property <bool > font-italic <=> base.font-italic;
1415 in property <bool > enabled <=> base.enabled;
1516 in property <string > placeholder-text <=> base.placeholder-text;
1617 out property <bool > has-focus : base.has-focus;
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ export component TextEdit {
6565 in property <bool > read-only <=> text-input.read-only;
6666 in property <length > font-size <=> text-input.font-size;
6767 in property <string > font-family <=> text-input.font-family;
68+ in property <bool > font-italic <=> text-input.font-italic;
6869 in property <bool > enabled <=> text-input.enabled;
6970 out property <length > visible-width <=> scroll-view.visible-width;
7071 out property <length > visible-height <=> scroll-view.visible-height;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export component TextEdit {
1111 in property <bool > read-only <=> base.read-only;
1212 in property <length > font-size <=> base.font-size;
1313 in property <string > font-family <=> base.font-family;
14+ in property <bool > font-italic <=> base.font-italic;
1415 in property <bool > enabled <=> base.enabled;
1516 in property <string > placeholder-text <=> base.placeholder-text;
1617 out property <bool > has-focus : base.has-focus;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export component TextEdit {
1111 in property <bool > read-only <=> base.read-only;
1212 in property <length > font-size <=> base.font-size;
1313 in property <string > font-family <=> base.font-family;
14+ in property <bool > font-italic <=> base.font-italic;
1415 in property <bool > enabled <=> base.enabled;
1516 in property <string > placeholder-text <=> base.placeholder-text;
1617 out property <bool > has-focus : base.has-focus;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export component TextEdit {
1010 in property <bool > read-only <=> base.read-only;
1111 in property <length > font-size <=> base.font-size;
1212 in property <string > font-family <=> base.font-family;
13+ in property <bool > font-italic <=> base.font-italic;
1314 in property <bool > enabled <=> base.enabled;
1415 in property <string > placeholder-text <=> base.placeholder-text;
1516 out property <bool > has-focus : base.has-focus;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export component TestCase inherits Window {
1717 in-out property <string > text <=> edit.text;
1818 in-out property <bool > read-only <=> edit.read-only;
1919 in-out property <bool > enabled <=> edit.enabled;
20+ in-out property <bool > font-italic <=> edit.font-italic;
2021 public function paste () {
2122 edit.paste ();
2223 }
@@ -108,6 +109,10 @@ instance.set_read_only(false);
108109instance.set_enabled(false);
109110instance.invoke_paste();
110111assert_eq!(instance.get_text(), "XxxHello👋");
112+
113+ assert_eq!(instance.get_font_italic(), false);
114+ instance.set_font_italic(true);
115+ assert_eq!(instance.get_font_italic(), true);
111116```
112117
113118*/
You can’t perform that action at this time.
0 commit comments