Tweak code to remove duplication

This commit is contained in:
Joseph Lyons 2023-02-24 08:53:58 -05:00
parent f8f1a3f86e
commit 72197802a2

View file

@ -44,13 +44,13 @@ impl View for FeedbackInfoText {
) )
.with_child( .with_child(
MouseEventHandler::<OpenZedCommunityRepo>::new(0, cx, |state, _| { MouseEventHandler::<OpenZedCommunityRepo>::new(0, cx, |state, _| {
let text = if state.hovered() { let contained_text = if state.hovered() {
theme.feedback.link_text_hover.clone() &theme.feedback.link_text_hover
} else { } else {
theme.feedback.link_text_default.clone() &theme.feedback.link_text_default
}; };
Label::new("community repo", text.text) Label::new("community repo", contained_text.text.clone())
.contained() .contained()
.aligned() .aligned()
.left() .left()