mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 04:44:30 +00:00
Tweak code to remove duplication
This commit is contained in:
parent
f8f1a3f86e
commit
72197802a2
1 changed files with 4 additions and 4 deletions
|
@ -44,13 +44,13 @@ impl View for FeedbackInfoText {
|
|||
)
|
||||
.with_child(
|
||||
MouseEventHandler::<OpenZedCommunityRepo>::new(0, cx, |state, _| {
|
||||
let text = if state.hovered() {
|
||||
theme.feedback.link_text_hover.clone()
|
||||
let contained_text = if state.hovered() {
|
||||
&theme.feedback.link_text_hover
|
||||
} 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()
|
||||
.aligned()
|
||||
.left()
|
||||
|
|
Loading…
Reference in a new issue