pub trait TextInputStyle {
fn height(&self) -> f64;
fn padding(&self) -> f64;
fn radius(&self) -> f64;
fn border_width_normal(&self) -> f64;
fn border_width_focused(&self) -> f64;
fn font_size(&self) -> f64;
fn cursor_width(&self) -> f64;
fn cursor_margin(&self) -> f64;
fn cursor_blink_half_period_ms(&self) -> u64;
}
pub struct DefaultTextInputStyle;
impl Default for DefaultTextInputStyle {
fn default() -> Self {
Self
}
}
impl TextInputStyle for DefaultTextInputStyle {
fn height(&self) -> f64 { 30.0 }
fn padding(&self) -> f64 { 8.0 }
fn radius(&self) -> f64 { 4.0 }
fn border_width_normal(&self) -> f64 { 1.0 }
fn border_width_focused(&self) -> f64 { 2.0 }
fn font_size(&self) -> f64 { 13.0 }
fn cursor_width(&self) -> f64 { 1.5 }
fn cursor_margin(&self) -> f64 { 4.0 }
fn cursor_blink_half_period_ms(&self) -> u64 { 500 }
}