Rename ParamWidgetBase::view
So we can also have a version that takes an explicit `cx` parameter.
This commit is contained in:
parent
d280c2d767
commit
3cdae526fd
|
@ -119,7 +119,7 @@ impl ParamWidgetBase {
|
||||||
/// values and access static parameter data.
|
/// values and access static parameter data.
|
||||||
///
|
///
|
||||||
/// This can be used directly as an argument to [`View::build()`].
|
/// This can be used directly as an argument to [`View::build()`].
|
||||||
pub fn view<L, Params, P, FMap, F, R>(
|
pub fn build_view<L, Params, P, FMap, F, R>(
|
||||||
params: L,
|
params: L,
|
||||||
params_to_param: FMap,
|
params_to_param: FMap,
|
||||||
content: F,
|
content: F,
|
||||||
|
|
|
@ -43,7 +43,7 @@ impl ParamButton {
|
||||||
}
|
}
|
||||||
.build(
|
.build(
|
||||||
cx,
|
cx,
|
||||||
ParamWidgetBase::view(params.clone(), params_to_param, move |cx, param_data| {
|
ParamWidgetBase::build_view(params.clone(), params_to_param, move |cx, param_data| {
|
||||||
Label::new(cx, param_data.param().name());
|
Label::new(cx, param_data.param().name());
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
|
@ -104,7 +104,7 @@ impl ParamSlider {
|
||||||
}
|
}
|
||||||
.build(
|
.build(
|
||||||
cx,
|
cx,
|
||||||
ParamWidgetBase::view(params, params_to_param, move |cx, param_data| {
|
ParamWidgetBase::build_view(params, params_to_param, move |cx, param_data| {
|
||||||
Binding::new(cx, ParamSlider::style, move |cx, style| {
|
Binding::new(cx, ParamSlider::style, move |cx, style| {
|
||||||
let style = style.get(cx);
|
let style = style.get(cx);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue