mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 13:10:54 +00:00
Merge pull request #2452 from zed-industries/prevent-some-rounding-clipping
Prevent some cases of clipping icons due to pixel coord rounding
This commit is contained in:
commit
cf304a0edc
2 changed files with 3 additions and 2 deletions
|
@ -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 a new issue