Fix some visual bugs w/ edit predictions (#24591)

* correct the size of key binding icons
* avoid spurious modifier in 'jump to edit' popover when already
previewing
* fix height of the edit preview popover

Release Notes:

- N/A

Co-authored-by: agu-z <hi@aguz.me>
This commit is contained in:
Max Brunsfeld 2025-02-10 15:49:08 -08:00 committed by GitHub
parent dab9c41799
commit 929c5e76b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 34 deletions

View file

@ -2975,6 +2975,22 @@ impl AbsoluteLength {
AbsoluteLength::Rems(rems) => rems.to_pixels(rem_size),
}
}
/// Converts an `AbsoluteLength` to `Rems` based on a given `rem_size`.
///
/// # Arguments
///
/// * `rem_size` - The size of one rem in pixels.
///
/// # Returns
///
/// Returns the `AbsoluteLength` as `Pixels`.
pub fn to_rems(&self, rem_size: Pixels) -> Rems {
match self {
AbsoluteLength::Pixels(pixels) => Rems(pixels.0 / rem_size.0),
AbsoluteLength::Rems(rems) => *rems,
}
}
}
impl Default for AbsoluteLength {