mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Prevent some cases of clipping icons due to pixel coord rounding
This commit is contained in:
parent
235470bbfd
commit
332b364a30
@ -199,7 +199,7 @@ impl<V: View> DragAndDrop<V> {
|
||||
return None;
|
||||
}
|
||||
|
||||
let position = position - region_offset;
|
||||
let position = (position - region_offset).round();
|
||||
Some(
|
||||
Overlay::new(
|
||||
MouseEventHandler::<DraggedElementHandler, V>::new(
|
||||
|
@ -1609,7 +1609,8 @@ impl Element<Editor> for EditorElement {
|
||||
let gutter_width;
|
||||
let gutter_margin;
|
||||
if snapshot.mode == EditorMode::Full {
|
||||
gutter_padding = style.text.em_width(cx.font_cache()) * style.gutter_padding_factor;
|
||||
let em_width = style.text.em_width(cx.font_cache());
|
||||
gutter_padding = (em_width * style.gutter_padding_factor).round();
|
||||
gutter_width = self.max_line_number_width(&snapshot, cx) + gutter_padding * 2.0;
|
||||
gutter_margin = -style.text.descent(cx.font_cache());
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user