Skip to content

Commit

Permalink
visual tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetophon committed Dec 8, 2024
1 parent 038203f commit e0d3580
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
35 changes: 15 additions & 20 deletions src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ impl DelayGraph {
y_end - y_start, // height
corner_radius, // radius
feather, // feather
Color::rgba(color_bytes.0, color_bytes.1, color_bytes.2, 142).into(), // Core color
Color::rgba(color_bytes.0, color_bytes.1, color_bytes.2, 169).into(), // Core color
Color::rgba(color_bytes.0, color_bytes.1, color_bytes.2, 0).into(), // Fade out
);

Expand Down Expand Up @@ -1214,25 +1214,20 @@ impl DelayGraph {
note_center_x
};

let color_bytes = (
(font_color.r * 255.0) as u8,
(font_color.g * 255.0) as u8,
(font_color.b * 255.0) as u8,
);
let pan_glow_paint = vg::Paint::box_gradient(
glow_x, // x
note_center_y - pan_glow_height * 0.5, // y
pan_foreground_length.abs(), // width
pan_glow_height, // height
pan_glow_height * 0.5, // radius
pan_feather, // feather
vg::Color::rgba(
(font_color.r * 255.0) as u8,
(font_color.g * 255.0) as u8,
(font_color.b * 255.0) as u8,
69,
), // Core color
vg::Color::rgba(
(font_color.r * 255.0) as u8,
(font_color.g * 255.0) as u8,
(font_color.b * 255.0) as u8,
0,
), // Fade out
glow_x, // x
note_center_y - pan_glow_height * 0.5, // y
pan_foreground_length.abs(), // width
pan_glow_height, // height
pan_glow_height * 0.5, // radius
pan_feather, // feather
vg::Color::rgba(color_bytes.0, color_bytes.1, color_bytes.2, 74), // Core color
vg::Color::rgba(color_bytes.0, color_bytes.1, color_bytes.2, 0), // Fade out
);

// Create rectangle for pan glow
Expand Down Expand Up @@ -1540,7 +1535,7 @@ impl View for ActionTrigger {
h + glow_width,
corner_radius,
feather,
Color::rgba(color_bytes.0, color_bytes.1, color_bytes.2, 105).into(), // Core glow
Color::rgba(color_bytes.0, color_bytes.1, color_bytes.2, 165).into(), // Core glow
Color::rgba(color_bytes.0, color_bytes.1, color_bytes.2, 0).into(), // Fade out
);

Expand Down
2 changes: 1 addition & 1 deletion src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ param-slider {
border-width: 1px;
background-color: #4e4e4e;
border-color: #fabdf0;
box-shadow: 0px 0px 10px #fabdf069;
box-shadow: 0px 0px 08px #fabdf0b9;
transition: background-color 240ms;
}

Expand Down

0 comments on commit e0d3580

Please sign in to comment.