Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T05:37:25.463Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

search_input.rs

21 lines · 652 B · rust
1use gpui::{Pixels, px};
2
3pub struct SearchInputWidth;
4
5impl SearchInputWidth {
6    /// The container size in which the input stops filling the whole width.
7    pub const THRESHOLD_WIDTH: Pixels = px(1200.0);
8
9    /// The maximum width for the search input when the container is larger than the threshold.
10    pub const MAX_WIDTH: Pixels = px(1200.0);
11
12    /// Calculates the actual width in pixels based on the container width.
13    pub fn calc_width(container_width: Pixels) -> Pixels {
14        if container_width < Self::THRESHOLD_WIDTH {
15            container_width
16        } else {
17            container_width.min(Self::MAX_WIDTH)
18        }
19    }
20}
21
Served at tenant.openagents/omega Member data and write actions are omitted.