manually mark editable text elements as stateful-interactive so overflow can be specified
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::editable_text::{
|
||||
};
|
||||
use gpui::{
|
||||
App, Bounds, Element, ElementId, InteractiveElement, Interactivity, IntoElement, Pixels,
|
||||
SharedString, StyleRefinement, Styled, WeakEntity, Window,
|
||||
SharedString, StatefulInteractiveElement, StyleRefinement, Styled, WeakEntity, Window,
|
||||
};
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
@@ -54,6 +54,8 @@ impl InteractiveElement for TextInputElement {
|
||||
}
|
||||
}
|
||||
|
||||
impl StatefulInteractiveElement for TextInputElement {}
|
||||
|
||||
impl Styled for TextInputElement {
|
||||
fn style(&mut self) -> &mut StyleRefinement {
|
||||
&mut self.interactivity.base_style
|
||||
|
||||
@@ -5,7 +5,7 @@ use crate::editable_text::{
|
||||
};
|
||||
use gpui::{
|
||||
App, Bounds, Element, ElementId, InteractiveElement, Interactivity, IntoElement, Pixels,
|
||||
SharedString, StyleRefinement, Styled, WeakEntity, Window,
|
||||
SharedString, StatefulInteractiveElement, StyleRefinement, Styled, WeakEntity, Window,
|
||||
};
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
@@ -53,6 +53,8 @@ impl InteractiveElement for TextAreaElement {
|
||||
}
|
||||
}
|
||||
|
||||
impl StatefulInteractiveElement for TextAreaElement {}
|
||||
|
||||
impl Styled for TextAreaElement {
|
||||
fn style(&mut self) -> &mut StyleRefinement {
|
||||
&mut self.interactivity.base_style
|
||||
|
||||
Reference in New Issue
Block a user