pub fn editor_content_rect(bounds: Rect, style: EditorStyle) -> RectExpand description
Computes the text content viewport inside the editor bounds.
Applies uniform logical-pixel padding and clamps width/height at zero. The origin still advances by padding when bounds are smaller or negative.
ยงExamples
use ailloli_ui_core::Rect;
use ailloli_ui_editor::{editor_content_rect, EditorStyle};
let rect = editor_content_rect(Rect::new(5.0, 7.0, 100.0, 60.0), EditorStyle::default());
assert_eq!(rect, Rect::new(15.0, 17.0, 80.0, 40.0));