Fix duplicate element_state error in tests
This commit is contained in:
parent
bee7055634
commit
77afc33d9d
1 changed files with 15 additions and 11 deletions
|
@ -325,17 +325,21 @@ impl ChatPanel {
|
||||||
enum SignInPromptLabel {}
|
enum SignInPromptLabel {}
|
||||||
|
|
||||||
Align::new(
|
Align::new(
|
||||||
MouseEventHandler::new::<SignInPromptLabel, _, _, _>(0, cx, |mouse_state, _| {
|
MouseEventHandler::new::<SignInPromptLabel, _, _, _>(
|
||||||
Label::new(
|
cx.view_id(),
|
||||||
"Sign in to use chat".to_string(),
|
cx,
|
||||||
if mouse_state.hovered {
|
|mouse_state, _| {
|
||||||
theme.chat_panel.hovered_sign_in_prompt.clone()
|
Label::new(
|
||||||
} else {
|
"Sign in to use chat".to_string(),
|
||||||
theme.chat_panel.sign_in_prompt.clone()
|
if mouse_state.hovered {
|
||||||
},
|
theme.chat_panel.hovered_sign_in_prompt.clone()
|
||||||
)
|
} else {
|
||||||
.boxed()
|
theme.chat_panel.sign_in_prompt.clone()
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
.boxed()
|
||||||
|
},
|
||||||
|
)
|
||||||
.with_cursor_style(CursorStyle::PointingHand)
|
.with_cursor_style(CursorStyle::PointingHand)
|
||||||
.on_click(move |cx| {
|
.on_click(move |cx| {
|
||||||
let rpc = rpc.clone();
|
let rpc = rpc.clone();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue