Skip to content

Commit fb2d642

Browse files
authored
Merge pull request #56 from ardura/dependencies_fix_stable_and_nightly
Compiling version with fix for newest rust and nightly. Dependencies …
2 parents fa9b90c + c1c4b94 commit fb2d642

File tree

12 files changed

+1122
-341
lines changed

12 files changed

+1122
-341
lines changed

Cargo.lock

Lines changed: 1061 additions & 297 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "Actuate"
3-
version = "1.3.8"
3+
version = "1.3.91"
44
edition = "2021"
55
authors = ["Ardura <azviscarra@gmail.com>"]
66
license = "GPL-3.0-or-later"
@@ -18,11 +18,11 @@ hound = "3.5.0"
1818
lazy_static = "1.4.0"
1919

2020
# Nih plug fork for actuate
21-
nih_plug = { git = "https://github.com/Ardura/nih-plug.git", rev = "47a03e97a58fc9bf30d36a8fc7996c8d2992ccea", features = ["assert_process_allocs"] }
22-
nih_plug_egui = { git = "https://github.com/Ardura/nih-plug.git", rev = "47a03e97a58fc9bf30d36a8fc7996c8d2992ccea" }
21+
nih_plug = { git = "https://github.com/Ardura/nih-plug.git", rev = "32e4e96d0d9820f28bcfd22a6cde4c05b5c71a51", features = ["assert_process_allocs"] }
22+
nih_plug_egui = { git = "https://github.com/Ardura/nih-plug.git", rev = "32e4e96d0d9820f28bcfd22a6cde4c05b5c71a51" }
2323

2424
# egui_file fork for nih-plug/Actuate
25-
egui_file = { git = "https://github.com/Ardura/egui_file.git", rev = "6c3aff8fecc9ae5c4310ab6c09c0b4bf8c4c7359" }
25+
egui_file = { git = "https://github.com/Ardura/egui_file.git", rev = "409258b8858ac1fb881ae2b5e40ff6d4a5cd474a" }
2626

2727
num-complex = "0.4.4"
2828
num-traits = "0.2.17"
@@ -36,9 +36,9 @@ serde_json = "1.0.107"
3636
dirs = "5.0.1"
3737
walkdir = "2.5.0"
3838
rayon = "1.10.0"
39-
zip = "2.5.0"
4039
anyhow = "1.0.97"
4140
ureq = { version = "3.0.10", features = ["json"] }
41+
zip = "3.0.0"
4242

4343
[profile.release]
4444
opt-level = 3

src/CustomWidgets/BeizerButton.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
use nih_plug::prelude::{Param, ParamSetter};
55
use nih_plug_egui::egui::{
6-
self,
7-
epaint::{CircleShape, CubicBezierShape},
8-
style::WidgetVisuals,
9-
Align2, Color32, FontId, Pos2, Rect, Response, Rounding, Shape, Stroke, Ui, Vec2, Widget,
6+
self, epaint::{CircleShape, CubicBezierShape}, style::WidgetVisuals, Align2, Color32, CornerRadius, FontId, Pos2, Rect, Response, Shape, Stroke, Ui, Vec2, Widget
107
};
118

129
// This allow is here since Actuate ended up only using HorizontalInline
@@ -338,23 +335,25 @@ impl<'a, P: Param> SliderRegion<'a, P> {
338335
}
339336
}
340337
},
341-
Rounding::from(4.0),
338+
CornerRadius::from(4.0),
342339
if self.background_color == Color32::PLACEHOLDER {
343340
visuals.bg_fill.linear_multiply(0.8)
344341
} else {
345342
self.background_color
346343
},
347344
visuals.bg_stroke,
345+
egui::StrokeKind::Middle,
348346
);
349347
ui.painter().rect(
350348
rect,
351-
Rounding::from(4.0),
349+
CornerRadius::from(4.0),
352350
if self.background_color == Color32::PLACEHOLDER {
353351
visuals.bg_fill.linear_multiply(0.8)
354352
} else {
355353
self.background_color.linear_multiply(0.8)
356354
},
357355
visuals.bg_stroke,
356+
egui::StrokeKind::Middle
358357
);
359358
let start_ball = Shape::Circle(CircleShape {
360359
center: control_points[0],

src/CustomWidgets/BoolButton.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ impl<'a, P: Param> SliderRegion<'a, P> {
7575
self.background_color
7676
},
7777
visuals.bg_stroke,
78+
egui::StrokeKind::Middle
7879
);
7980
// Paint the circle, animating it from left to right with `how_on`:
8081
ui.painter().rect_stroke(
@@ -87,6 +88,7 @@ impl<'a, P: Param> SliderRegion<'a, P> {
8788
.color
8889
.linear_multiply((how_on + 0.2).clamp(0.2, 1.2)),
8990
),
91+
egui::StrokeKind::Middle
9092
);
9193
let center = egui::pos2(rect.center().x, rect.center().y);
9294
ui.painter().text(

src/CustomWidgets/ComboBoxParam.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl<'a, P: Param> Widget for ParamComboBox<'a, P> {
4040
let mut current_value = self.get_current_value();
4141
let mut changed = false; // Flag to detect change
4242

43-
let response = ComboBox::from_id_source(self.param.name().to_owned() + &self.id_name)
43+
let response = ComboBox::from_id_salt(self.param.name().to_owned() + &self.id_name)
4444
.selected_text(current_value.clone())
4545
.show_ui(ui, |ui| {
4646
for option in &self.options {

src/CustomWidgets/CustomParamSlider.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::sync::{Arc, LazyLock};
55
use nih_plug::{
66
prelude::{Param, ParamSetter},
77
};
8-
use nih_plug_egui::egui::{self, vec2, Color32, Key, Response, Sense, Stroke, TextEdit, TextStyle, Ui, Vec2, Widget, WidgetText};
8+
use nih_plug_egui::egui::{self, emath, vec2, Color32, Key, Response, Sense, Stroke, TextEdit, TextStyle, Ui, Vec2, Widget, WidgetText};
99
use nih_plug_egui::widgets::util as nUtil;
1010
use parking_lot::Mutex;
1111

@@ -318,12 +318,14 @@ impl<'a, P: Param> ParamSlider<'a, P> {
318318
response.rect,
319319
0.0,
320320
Stroke::new(1.0, ui.visuals().widgets.active.bg_fill),
321+
egui::StrokeKind::Middle
321322
);
322323
} else {
323324
ui.painter().rect_stroke(
324325
response.rect,
325326
0.0,
326327
Stroke::new(1.0, self.background_set_color),
328+
egui::StrokeKind::Middle
327329
);
328330
}
329331
}
@@ -393,9 +395,10 @@ impl<'a, P: Param> ParamSlider<'a, P> {
393395
let stroke = visuals.bg_stroke;
394396
ui.painter().rect(
395397
response.rect.expand(visuals.expansion),
396-
visuals.rounding,
398+
visuals.corner_radius,
397399
fill,
398400
stroke,
401+
egui::StrokeKind::Middle
399402
);
400403
}
401404
let text_pos = ui
@@ -434,9 +437,10 @@ impl<'a, P: Param> ParamSlider<'a, P> {
434437
let stroke = visuals.bg_stroke;
435438
ui.painter().rect(
436439
response.rect.expand(visuals.expansion),
437-
visuals.rounding,
440+
visuals.corner_radius,
438441
fill,
439442
stroke,
443+
egui::StrokeKind::Middle
440444
);
441445
}
442446
let text_pos = ui
@@ -476,7 +480,8 @@ impl<P: Param> Widget for ParamSlider<'_, P> {
476480
let height = ui
477481
.text_style_height(&TextStyle::Body)
478482
.max(ui.spacing().interact_size.y * slimmer_scale);
479-
let slider_height = ui.painter().round_to_pixel(height * 0.8);
483+
484+
let slider_height = emath::GuiRounding::round_to_pixels(height * 0.8, ui.painter().pixels_per_point());
480485
let mut response = ui
481486
.vertical(|ui| {
482487
ui.allocate_space(vec2(slider_width, (height - slider_height) / 2.0));

src/CustomWidgets/CustomVerticalSlider.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,14 @@ impl<'a, P: Param> ParamSlider<'a, P> {
332332
response.rect,
333333
4.0,
334334
Stroke::new(1.0, ui.visuals().widgets.active.bg_fill),
335+
egui::StrokeKind::Middle
335336
);
336337
} else {
337338
ui.painter().rect_stroke(
338339
response.rect,
339340
4.0,
340341
Stroke::new(1.0, self.background_set_color),
342+
egui::StrokeKind::Middle
341343
);
342344
}
343345
}
@@ -380,9 +382,10 @@ impl<'a, P: Param> ParamSlider<'a, P> {
380382
let stroke = visuals.bg_stroke;
381383
ui.painter().rect(
382384
response.rect.expand(visuals.expansion),
383-
visuals.rounding,
385+
visuals.corner_radius,
384386
fill,
385387
stroke,
388+
egui::StrokeKind::Middle
386389
);
387390
}
388391

src/CustomWidgets/slim_checkbox.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
// ----------------------------------------------------------------------------
55

6-
use std::sync::atomic::{AtomicBool, Ordering};
6+
use std::sync::{atomic::{AtomicBool, Ordering}, Arc};
77
use nih_plug_egui::egui::{
8-
epaint, pos2, vec2, NumExt, Rect, Response, Sense, Shape, TextStyle, TextureId, Ui, Vec2, Widget, WidgetInfo, WidgetText, WidgetType
8+
self, epaint::{self, Brush}, pos2, vec2, NumExt, Response, Sense, Shape, TextStyle, TextureId, Ui, Vec2, Widget, WidgetInfo, WidgetText, WidgetType
99
};
1010

1111
// TODO(emilk): allow checkbox without a text label
@@ -92,12 +92,16 @@ impl<'a> Widget for AtomicSlimCheckbox<'a> {
9292
let (small_icon_rect, big_icon_rect) = ui.spacing().icon_rectangles(rect);
9393
ui.painter().add(epaint::RectShape {
9494
rect: big_icon_rect.expand(visuals.expansion),
95-
rounding: visuals.rounding,
95+
corner_radius: visuals.corner_radius,
9696
fill: visuals.bg_fill,
9797
stroke: visuals.bg_stroke,
98-
fill_texture_id: TextureId::default(),
99-
uv: big_icon_rect.expand(visuals.expansion),
98+
round_to_pixels: Option::None,
10099
blur_width: 0.0,
100+
brush: Option::Some(Arc::new(Brush {
101+
fill_texture_id: TextureId::default(),
102+
uv: big_icon_rect.expand(visuals.expansion),
103+
})),
104+
stroke_kind: egui::StrokeKind::Middle,
101105
});
102106

103107
if checked.load(Ordering::SeqCst) {
@@ -185,12 +189,16 @@ impl<'a> Widget for SlimCheckbox<'a> {
185189
let (small_icon_rect, big_icon_rect) = ui.spacing().icon_rectangles(rect);
186190
ui.painter().add(epaint::RectShape {
187191
rect: big_icon_rect.expand(visuals.expansion),
188-
rounding: visuals.rounding,
192+
corner_radius: visuals.corner_radius,
189193
fill: visuals.weak_bg_fill,
190194
stroke: visuals.fg_stroke,
191-
fill_texture_id: TextureId::default(),
192-
uv: Rect::ZERO,
195+
round_to_pixels: Option::None,
193196
blur_width: 0.0,
197+
brush: Option::Some(Arc::new(Brush {
198+
fill_texture_id: TextureId::default(),
199+
uv: big_icon_rect.expand(visuals.expansion),
200+
})),
201+
stroke_kind: egui::StrokeKind::Middle
194202
});
195203

196204
if *checked {

src/CustomWidgets/toggle_switch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl<'a, P: Param> SliderRegion<'a, P> {
4747
let rect = rect.expand(visuals.expansion);
4848
let radius = 0.5 * rect.height();
4949
ui.painter()
50-
.rect(rect, radius, visuals.bg_fill, visuals.bg_stroke);
50+
.rect(rect, radius, visuals.bg_fill, visuals.bg_stroke, egui::StrokeKind::Middle);
5151
// Paint the circle, animating it from left to right with `how_on`:
5252
let circle_x = egui::lerp((rect.left() + radius)..=(rect.right() - radius), how_on);
5353
let center = egui::pos2(circle_x, rect.center().y);

src/CustomWidgets/ui_knob.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use nih_plug::prelude::{Param, ParamSetter};
1111
use nih_plug_egui::egui::{
1212
self,
1313
epaint::{CircleShape, PathShape, PathStroke},
14-
pos2, Align2, Color32, FontId, Pos2, Rect, Response, Rgba, Rounding, Sense, Shape, Stroke, Ui,
14+
pos2, Align2, Color32, FontId, Pos2, Rect, Response, Rgba, CornerRadius, Sense, Shape, Stroke, Ui,
1515
Vec2, Widget,
1616
};
1717

@@ -446,12 +446,12 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
446446
// Background Rect
447447
ui.painter().rect_filled(
448448
response.rect,
449-
Rounding::from(4.0),
449+
CornerRadius::from(4.0),
450450
self.black01,
451451
);
452452
ui.painter().rect_filled(
453453
response.rect,
454-
Rounding::from(4.0),
454+
CornerRadius::from(4.0),
455455
self.fill04,
456456
);
457457

@@ -771,7 +771,7 @@ impl<'a, P: Param> Widget for ArcKnob<'a, P> {
771771
);
772772
ui.painter().rect_filled(
773773
readability_box,
774-
Rounding::from(16.0),
774+
CornerRadius::from(16.0),
775775
self.fill_color,
776776
);
777777
}

0 commit comments

Comments
 (0)