allow deprecated round_rect_to_pixels

This commit is contained in:
Ken Sedgwick
2025-02-27 15:51:15 -08:00
committed by William Casarin
parent 27f4acea1c
commit 2f4d9442f0
3 changed files with 10 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ pub fn padding<R>(
pub fn hline(ui: &egui::Ui) {
// pixel perfect horizontal line
let rect = ui.available_rect_before_wrap();
#[allow(deprecated)]
let resize_y = ui.painter().round_to_pixel(rect.top()) - 0.5;
let stroke = ui.style().visuals.widgets.noninteractive.bg_stroke;
ui.painter().hline(rect.x_range(), resize_y, stroke);