We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 642bcc1 commit 679ee93Copy full SHA for 679ee93
crates/egui/src/text_selection/visuals.rs
@@ -96,6 +96,8 @@ pub fn paint_text_selection(
96
pub fn paint_cursor_end(painter: &Painter, visuals: &Visuals, cursor_rect: Rect) {
97
let stroke = visuals.text_cursor.stroke;
98
99
+ // Ensure the cursor is aligned to the pixel grid for whole number widths.
100
+ // See https://github.com/emilk/egui/issues/5164
101
let (top, bottom) = if (stroke.width as usize) % 2 == 0 {
102
(
103
painter.round_pos_to_pixels(cursor_rect.center_top()),
0 commit comments