(area: Rect, padding_x: u16, padding_y: u16)
| 47 | } |
| 48 | |
| 49 | fn inset_rect(area: Rect, padding_x: u16, padding_y: u16) -> Rect { |
| 50 | if area.width == 0 || area.height == 0 { |
| 51 | return area; |
| 52 | } |
| 53 | |
| 54 | let twice_x = padding_x.saturating_mul(2); |
| 55 | let twice_y = padding_y.saturating_mul(2); |
| 56 | if area.width <= twice_x || area.height <= twice_y { |
| 57 | return area; |
| 58 | } |
| 59 | |
| 60 | Rect { |
| 61 | x: area.x.saturating_add(padding_x), |
| 62 | y: area.y.saturating_add(padding_y), |
| 63 | width: area.width.saturating_sub(twice_x), |
| 64 | height: area.height.saturating_sub(twice_y), |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | pub use agent_select::{Agent, AgentSelectDialog}; |
| 69 | pub use alert::AlertDialog; |
no outgoing calls
no test coverage detected