pub struct TextInputStyle {
pub font_family: Option<String>,
pub font_size: Option<f64>,
pub font_weight: Option<FontWeight>,
pub text_direction: TextDirection,
pub text_align: TextAlign,
pub letter_spacing: Option<f64>,
pub word_spacing: Option<f64>,
pub line_height: Option<f64>,
}Expand description
Text styling information for the current input client.
See also:
TextInputConnection::update_style, which uses this class to send style information to the platform.
Fields§
§font_family: Option<String>The name of the font to use when painting the text (e.g., Roboto).
font_size: Option<f64>The size of fonts (in logical pixels) to use when painting the text.
font_weight: Option<FontWeight>The typeface thickness to use when painting the text (e.g., bold).
text_direction: TextDirectionThe directionality of the text.
text_align: TextAlignHow the text should be aligned horizontally.
letter_spacing: Option<f64>The amount of space (in logical pixels) to add between each letter.
word_spacing: Option<f64>The amount of space (in logical pixels) to add at each sequence of white-space (i.e. between each word).
line_height: Option<f64>The line height in logical pixels.
Implementations§
Source§impl TextInputStyle
impl TextInputStyle
Sourcepub fn new(
text_direction: TextDirection,
text_align: TextAlign,
) -> TextInputStyle
pub fn new( text_direction: TextDirection, text_align: TextAlign, ) -> TextInputStyle
Creates text styling information for the current input client.
Trait Implementations§
Source§impl Clone for TextInputStyle
impl Clone for TextInputStyle
Source§impl Debug for TextInputStyle
impl Debug for TextInputStyle
Source§impl PartialEq for TextInputStyle
impl PartialEq for TextInputStyle
impl StructuralPartialEq for TextInputStyle
Auto Trait Implementations§
impl Freeze for TextInputStyle
impl RefUnwindSafe for TextInputStyle
impl Send for TextInputStyle
impl Sync for TextInputStyle
impl Unpin for TextInputStyle
impl UnsafeUnpin for TextInputStyle
impl UnwindSafe for TextInputStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more