Constrain context menu to the width of the widest item
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
f403d87eff
commit
3b2f1644fb
8 changed files with 200 additions and 93 deletions
|
@ -524,6 +524,15 @@ impl SizeConstraint {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for SizeConstraint {
|
||||
fn default() -> Self {
|
||||
SizeConstraint {
|
||||
min: Vector2F::zero(),
|
||||
max: Vector2F::splat(f32::INFINITY),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ToJson for SizeConstraint {
|
||||
fn to_json(&self) -> serde_json::Value {
|
||||
json!({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue