Rename text_alignment
This commit is contained in:
parent
25bf7ee798
commit
350c00c52a
|
@ -88,7 +88,8 @@ pub mod dioxus_elements {
|
|||
pub const NAME_SPACE: Option<&'static str> = NAME_SPACE;
|
||||
pub const text: AttributeDescription = ("text", None, false);
|
||||
pub const text_direction: AttributeDescription = ("text_direction", None, false);
|
||||
pub const text_alignment: AttributeDescription = ("text_alignment", None, false);
|
||||
pub const text_multiline_alignment: AttributeDescription =
|
||||
("text_multiline_alignment", None, false);
|
||||
pub const text_size: AttributeDescription = ("text_size", None, false);
|
||||
pub const text_color: AttributeDescription = ("text_color", None, false);
|
||||
node_attributes!();
|
||||
|
|
|
@ -34,7 +34,7 @@ impl HotReloadingContext for HotReloadContext {
|
|||
let attribute = match attribute_name_rust {
|
||||
"text" => Some(("text", None)),
|
||||
"text_direction" => Some(("text_direction", None)),
|
||||
"text_alignment" => Some(("text_alignment", None)),
|
||||
"text_multiline_alignment" => Some(("text_multiline_alignment", None)),
|
||||
"text_size" => Some(("text_size", None)),
|
||||
"text_color" => Some(("text_color", None)),
|
||||
_ => None,
|
||||
|
|
|
@ -186,13 +186,13 @@ pub fn set_attribute(
|
|||
("text_direction", "right_to_left") if text.is_some() => {
|
||||
style.direction = Direction::RightToLeft;
|
||||
}
|
||||
("text_alignment", "left") if text.is_some() => {
|
||||
("text_multiline_alignment", "left") if text.is_some() => {
|
||||
text.unwrap().alignment = TextAlignment::Left;
|
||||
}
|
||||
("text_alignment", "center") if text.is_some() => {
|
||||
("text_multiline_alignment", "center") if text.is_some() => {
|
||||
text.unwrap().alignment = TextAlignment::Center;
|
||||
}
|
||||
("text_alignment", "right") if text.is_some() => {
|
||||
("text_multiline_alignment", "right") if text.is_some() => {
|
||||
text.unwrap().alignment = TextAlignment::Right;
|
||||
}
|
||||
("text_size", value) if text.is_some() => {
|
||||
|
|
Loading…
Reference in a new issue