tui: bring the transcript closer to display mode (#4848)
before <img width="1161" height="836" alt="Screenshot 2025-10-06 at 3 06 52 PM" src="https://github.com/user-attachments/assets/7622fd6b-9d37-402f-8651-61c2c55dcbc6" /> after <img width="1161" height="858" alt="Screenshot 2025-10-06 at 3 07 02 PM" src="https://github.com/user-attachments/assets/1498f327-1d1a-4630-951f-7ca371ab0139" />
This commit is contained in:
@@ -38,11 +38,13 @@ pub trait RectExt {
|
||||
|
||||
impl RectExt for Rect {
|
||||
fn inset(&self, insets: Insets) -> Rect {
|
||||
let horizontal = insets.left.saturating_add(insets.right);
|
||||
let vertical = insets.top.saturating_add(insets.bottom);
|
||||
Rect {
|
||||
x: self.x + insets.left,
|
||||
y: self.y + insets.top,
|
||||
width: self.width - insets.left - insets.right,
|
||||
height: self.height - insets.top - insets.bottom,
|
||||
x: self.x.saturating_add(insets.left),
|
||||
y: self.y.saturating_add(insets.top),
|
||||
width: self.width.saturating_sub(horizontal),
|
||||
height: self.height.saturating_sub(vertical),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user