feat(method): remove old build() method
This commit is contained in:
parent
2e1f4b6a12
commit
f57aed1fb8
|
@ -101,37 +101,5 @@ impl InputBuilder {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(self, monospace: bool, wrap_mode: WrapMode, input_height: i32) -> Input {
|
|
||||||
let input_component = Box::new(Orientation::Vertical, 0);
|
|
||||||
|
|
||||||
let text_view_label = Label::builder()
|
|
||||||
.halign(self.align.horizontal)
|
|
||||||
.valign(self.align.vertical)
|
|
||||||
.set_margin(self.margins)
|
|
||||||
.label(self.label)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
let text_view_input = TextView::builder()
|
|
||||||
.monospace(monospace)
|
|
||||||
.height_request(input_height)
|
|
||||||
.set_text_view_margin(MarginData::EqualsMargin(6))
|
|
||||||
.wrap_mode(wrap_mode)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
let text_view_input_frame = Frame::builder()
|
|
||||||
.child(&text_view_input)
|
|
||||||
.set_margin(MarginData::MultipleMargin((0, 5, 0, 5)))
|
|
||||||
.build();
|
|
||||||
|
|
||||||
input_component.append(&text_view_label);
|
|
||||||
input_component.append(&text_view_input_frame);
|
|
||||||
|
|
||||||
Input {
|
|
||||||
component: input_component,
|
|
||||||
input: text_view_input.clone(),
|
|
||||||
input_frame: text_view_input_frame.clone(),
|
|
||||||
input_label: text_view_label.clone(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
build_for!((TextView, build), (Entry, build_entry));
|
build_for!((TextView, build), (Entry, build_entry));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue