refactor: replace standard sliders with PlainSlider for better UI consistency

This commit is contained in:
2026-07-19 01:53:51 +03:00
parent 9388e6f096
commit e90cb2d31d
8 changed files with 228 additions and 170 deletions
+7 -2
View File
@@ -294,14 +294,19 @@ fn render_shape(layer: &mut Layer, shape: &VectorShape) {
let (rot_x3, rot_y3) = rotate_point(rx3, ry3, cx, cy, *angle);
let (rot_x4, rot_y4) = rotate_point(rx4, ry4, cx, cy, *angle);
draw_line(layer, rot_x1, rot_y1, rot_x2, rot_y2, px_color, *stroke, None);
let head_mid_x = (rot_x3 + rot_x4) / 2.0;
let head_mid_y = (rot_y3 + rot_y4) / 2.0;
draw_line(layer, rot_x1, rot_y1, head_mid_x, head_mid_y, px_color, *stroke, None);
draw_line(layer, rot_x2, rot_y2, rot_x3, rot_y3, px_color, *stroke, None);
draw_line(layer, rot_x2, rot_y2, rot_x4, rot_y4, px_color, *stroke, None);
draw_line(layer, rot_x3, rot_y3, rot_x4, rot_y4, px_color, *stroke, None);
if *fill {
let fill_alpha = (fill_color[3] as f32 * opacity).round() as u8;
let px_fill = [fill_color[0], fill_color[1], fill_color[2], fill_alpha];
draw_line(layer, rot_x2, rot_y2, rot_x3, rot_y3, px_fill, arrow_head_len, None);
let arrowhead_pts = vec![(rot_x2, rot_y2), (rot_x3, rot_y3), (rot_x4, rot_y4)];
fill_polygon(layer, &arrowhead_pts, px_fill);
}
}
Star { x1, y1, x2, y2, stroke, color, fill_color, fill, points, inner_radius, opacity, angle, .. } => {