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:
parent
dab9c41799
commit
929c5e76b4
6 changed files with 37 additions and 34 deletions
|
@ -66,7 +66,7 @@ pub enum IconSize {
|
|||
Medium,
|
||||
/// 48px
|
||||
XLarge,
|
||||
Custom(Pixels),
|
||||
Custom(Rems),
|
||||
}
|
||||
|
||||
impl IconSize {
|
||||
|
@ -77,7 +77,7 @@ impl IconSize {
|
|||
IconSize::Small => rems_from_px(14.),
|
||||
IconSize::Medium => rems_from_px(16.),
|
||||
IconSize::XLarge => rems_from_px(48.),
|
||||
IconSize::Custom(size) => rems_from_px(size.into()),
|
||||
IconSize::Custom(size) => size,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ impl IconSize {
|
|||
IconSize::Medium => DynamicSpacing::Base02.px(cx),
|
||||
IconSize::XLarge => DynamicSpacing::Base02.px(cx),
|
||||
// TODO: Wire into dynamic spacing
|
||||
IconSize::Custom(size) => px(size.into()),
|
||||
IconSize::Custom(size) => size.to_pixels(window.rem_size()),
|
||||
};
|
||||
|
||||
(icon_size, padding)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue