Also DPI scale the PeakMeter hold position
This commit is contained in:
parent
66b8d6938a
commit
23add14697
|
@ -249,11 +249,11 @@ where
|
||||||
// need to account for that. Otherwise the ticks will be 2px wide instead of 1px.
|
// need to account for that. Otherwise the ticks will be 2px wide instead of 1px.
|
||||||
let peak_x = db_to_x_coord(peak_dbfs);
|
let peak_x = db_to_x_coord(peak_dbfs);
|
||||||
let mut path = Path::new();
|
let mut path = Path::new();
|
||||||
path.move_to(peak_x + 0.5, bar_bounds.top());
|
path.move_to(peak_x + (dpi_scale / 2.0), bar_bounds.top());
|
||||||
path.line_to(peak_x + 0.5, bar_bounds.bottom());
|
path.line_to(peak_x + (dpi_scale / 2.0), bar_bounds.bottom());
|
||||||
|
|
||||||
let mut paint = Paint::color(femtovg::Color::rgbaf(0.3, 0.3, 0.3, opacity));
|
let mut paint = Paint::color(femtovg::Color::rgbaf(0.3, 0.3, 0.3, opacity));
|
||||||
paint.set_line_width(TICK_WIDTH);
|
paint.set_line_width(TICK_WIDTH * dpi_scale);
|
||||||
canvas.stroke_path(&mut path, paint);
|
canvas.stroke_path(&mut path, paint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue