feat(setter): remove old trait
Trait TextViewSetters has been removed as there is already an analogue of this trait in existence
This commit is contained in:
parent
7282045c98
commit
7116b565de
|
@ -23,7 +23,6 @@ pub enum MarginData {
|
|||
*/
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
pub struct Size {
|
||||
pub width: i32,
|
||||
pub height: i32,
|
||||
|
@ -44,27 +43,6 @@ pub trait Setters {
|
|||
fn set_align(self, align: Alignment) -> Self;
|
||||
}
|
||||
|
||||
pub trait TextViewSetters {
|
||||
fn set_text_view_margin(self, margin: MarginData) -> Self;
|
||||
}
|
||||
|
||||
impl TextViewSetters for TextViewBuilder {
|
||||
fn set_text_view_margin(self, margin: MarginData) -> Self {
|
||||
match margin {
|
||||
MarginData::EqualsMargin(margin) => self
|
||||
.top_margin(margin)
|
||||
.left_margin(margin)
|
||||
.bottom_margin(margin)
|
||||
.right_margin(margin),
|
||||
MarginData::MultipleMargin(margins) => self
|
||||
.top_margin(margins.0)
|
||||
.left_margin(margins.1)
|
||||
.bottom_margin(margins.2)
|
||||
.right_margin(margins.3),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Macros
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue