Switched from active hover to NSViews acceptsFirstMouse API
This commit is contained in:
parent
4eeb1aec50
commit
88170df7f0
6 changed files with 24 additions and 11 deletions
|
@ -417,13 +417,9 @@ impl CollabTitlebarItem {
|
|||
theme: &Theme,
|
||||
cx: &mut RenderContext<Self>,
|
||||
) -> ElementBox {
|
||||
let (is_followed, is_following) = peer.map_or((false, false), |(peer_id, _, _)| {
|
||||
(
|
||||
workspace.read(cx).is_following(peer_id),
|
||||
workspace.read(cx).is_followed(peer_id),
|
||||
)
|
||||
let is_followed = peer.map_or(false, |(peer_id, _, _)| {
|
||||
workspace.read(cx).is_following(peer_id)
|
||||
});
|
||||
// my color, around their avatar.
|
||||
|
||||
let mut avatar_style;
|
||||
if let Some((_, _, location)) = peer.as_ref() {
|
||||
|
@ -446,10 +442,6 @@ impl CollabTitlebarItem {
|
|||
replica_color = Some(color);
|
||||
if is_followed {
|
||||
avatar_style.border = Border::all(1.0, color);
|
||||
} else if is_following {
|
||||
let our_id = workspace.read(cx).project().read(cx).replica_id();
|
||||
let our_color = theme.editor.replica_selection_style(our_id).cursor;
|
||||
avatar_style.border = Border::all(1.0, our_color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,10 +45,11 @@ pub fn init(cx: &mut MutableAppContext) {
|
|||
kind: WindowKind::PopUp,
|
||||
is_movable: false,
|
||||
screen: Some(screen),
|
||||
accepts_first_mouse: true,
|
||||
},
|
||||
|_| IncomingCallNotification::new(incoming_call.clone()),
|
||||
);
|
||||
cx.activate_window(window_id);
|
||||
|
||||
notification_windows.push(window_id);
|
||||
}
|
||||
}
|
||||
|
@ -226,6 +227,7 @@ impl View for IncomingCallNotification {
|
|||
.theme
|
||||
.incoming_call_notification
|
||||
.background;
|
||||
|
||||
Flex::row()
|
||||
.with_child(self.render_caller(cx))
|
||||
.with_child(self.render_buttons(cx))
|
||||
|
|
|
@ -44,6 +44,7 @@ pub fn init(cx: &mut MutableAppContext) {
|
|||
kind: WindowKind::PopUp,
|
||||
is_movable: false,
|
||||
screen: Some(screen),
|
||||
accepts_first_mouse: true,
|
||||
},
|
||||
|_| {
|
||||
ProjectSharedNotification::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue