ConstructEssentials
i'm really out of ideas how to name another struct name with function parameters. Well, here we go - essentials.
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::{
|
||||
AttribPair, ParserContext, ParserFile, parse_check_f32, parse_children, process_component,
|
||||
style::{parse_color_opt, parse_round, parse_style, parse_text_style},
|
||||
},
|
||||
widget::util::WLength,
|
||||
widget::{ConstructEssentials, util::WLength},
|
||||
};
|
||||
|
||||
pub fn parse_component_button<'a, U1, U2>(
|
||||
@@ -60,13 +60,12 @@ pub fn parse_component_button<'a, U1, U2>(
|
||||
}
|
||||
}
|
||||
|
||||
let globals = ctx.layout.state.globals.clone();
|
||||
|
||||
let (widget, component) = button::construct(
|
||||
&mut globals.get(),
|
||||
ctx.layout,
|
||||
ctx.listeners,
|
||||
parent_id,
|
||||
ConstructEssentials {
|
||||
layout: ctx.layout,
|
||||
listeners: ctx.listeners,
|
||||
parent: parent_id,
|
||||
},
|
||||
button::Params {
|
||||
color,
|
||||
border,
|
||||
|
||||
@@ -3,6 +3,7 @@ use crate::{
|
||||
i18n::Translation,
|
||||
layout::WidgetID,
|
||||
parser::{AttribPair, ParserContext, parse_check_f32, parse_check_i32, process_component, style::parse_style},
|
||||
widget::ConstructEssentials,
|
||||
};
|
||||
|
||||
pub fn parse_component_checkbox<U1, U2>(
|
||||
@@ -36,9 +37,11 @@ pub fn parse_component_checkbox<U1, U2>(
|
||||
}
|
||||
|
||||
let (widget, component) = checkbox::construct(
|
||||
ctx.layout,
|
||||
ctx.listeners,
|
||||
parent_id,
|
||||
ConstructEssentials {
|
||||
layout: ctx.layout,
|
||||
listeners: ctx.listeners,
|
||||
parent: parent_id,
|
||||
},
|
||||
checkbox::Params {
|
||||
box_size,
|
||||
text: translation,
|
||||
|
||||
@@ -2,6 +2,7 @@ use crate::{
|
||||
components::{Component, slider},
|
||||
layout::WidgetID,
|
||||
parser::{AttribPair, ParserContext, parse_check_f32, process_component, style::parse_style},
|
||||
widget::ConstructEssentials,
|
||||
};
|
||||
|
||||
pub fn parse_component_slider<U1, U2>(
|
||||
@@ -32,9 +33,11 @@ pub fn parse_component_slider<U1, U2>(
|
||||
}
|
||||
|
||||
let (widget, component) = slider::construct(
|
||||
ctx.layout,
|
||||
ctx.listeners,
|
||||
parent_id,
|
||||
ConstructEssentials {
|
||||
layout: ctx.layout,
|
||||
listeners: ctx.listeners,
|
||||
parent: parent_id,
|
||||
},
|
||||
slider::Params {
|
||||
style,
|
||||
values: slider::ValuesMinMax {
|
||||
|
||||
Reference in New Issue
Block a user