title_bar: Fix the order of the collab buttons (#25775)
My previous #24761 and #25192 PR's changed the order of the buttons in the title_bar for collab, the logic is kept the same but the order is now as it was previously. Release Notes: - N/A Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
parent
482a45feac
commit
c47305dd7b
1 changed files with 54 additions and 54 deletions
|
@ -350,42 +350,6 @@ impl TitleBar {
|
||||||
.into_any_element(),
|
.into_any_element(),
|
||||||
);
|
);
|
||||||
|
|
||||||
children.push(
|
|
||||||
IconButton::new(
|
|
||||||
"mute-sound",
|
|
||||||
if is_deafened {
|
|
||||||
ui::IconName::AudioOff
|
|
||||||
} else {
|
|
||||||
ui::IconName::AudioOn
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.style(ButtonStyle::Subtle)
|
|
||||||
.selected_style(ButtonStyle::Tinted(TintColor::Error))
|
|
||||||
.icon_size(IconSize::Small)
|
|
||||||
.toggle_state(is_deafened)
|
|
||||||
.tooltip(move |window, cx| {
|
|
||||||
if is_deafened {
|
|
||||||
let label = "Unmute Audio";
|
|
||||||
|
|
||||||
if !muted_by_user {
|
|
||||||
Tooltip::with_meta(label, None, "Microphone will be unmuted", window, cx)
|
|
||||||
} else {
|
|
||||||
Tooltip::simple(label, cx)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let label = "Mute Audio";
|
|
||||||
|
|
||||||
if !muted_by_user {
|
|
||||||
Tooltip::with_meta(label, None, "Microphone will be muted", window, cx)
|
|
||||||
} else {
|
|
||||||
Tooltip::simple(label, cx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.on_click(move |_, _, cx| toggle_deafen(&Default::default(), cx))
|
|
||||||
.into_any_element(),
|
|
||||||
);
|
|
||||||
|
|
||||||
if can_use_microphone {
|
if can_use_microphone {
|
||||||
children.push(
|
children.push(
|
||||||
IconButton::new(
|
IconButton::new(
|
||||||
|
@ -422,25 +386,61 @@ impl TitleBar {
|
||||||
})
|
})
|
||||||
.into_any_element(),
|
.into_any_element(),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if screen_sharing_supported {
|
children.push(
|
||||||
children.push(
|
IconButton::new(
|
||||||
IconButton::new("screen-share", ui::IconName::Screen)
|
"mute-sound",
|
||||||
.style(ButtonStyle::Subtle)
|
if is_deafened {
|
||||||
.icon_size(IconSize::Small)
|
ui::IconName::AudioOff
|
||||||
.toggle_state(is_screen_sharing)
|
} else {
|
||||||
.selected_style(ButtonStyle::Tinted(TintColor::Accent))
|
ui::IconName::AudioOn
|
||||||
.tooltip(Tooltip::text(if is_screen_sharing {
|
},
|
||||||
"Stop Sharing Screen"
|
)
|
||||||
} else {
|
.style(ButtonStyle::Subtle)
|
||||||
"Share Screen"
|
.selected_style(ButtonStyle::Tinted(TintColor::Error))
|
||||||
}))
|
.icon_size(IconSize::Small)
|
||||||
.on_click(move |_, window, cx| {
|
.toggle_state(is_deafened)
|
||||||
toggle_screen_sharing(&Default::default(), window, cx)
|
.tooltip(move |window, cx| {
|
||||||
})
|
if is_deafened {
|
||||||
.into_any_element(),
|
let label = "Unmute Audio";
|
||||||
);
|
|
||||||
}
|
if !muted_by_user {
|
||||||
|
Tooltip::with_meta(label, None, "Microphone will be unmuted", window, cx)
|
||||||
|
} else {
|
||||||
|
Tooltip::simple(label, cx)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let label = "Mute Audio";
|
||||||
|
|
||||||
|
if !muted_by_user {
|
||||||
|
Tooltip::with_meta(label, None, "Microphone will be muted", window, cx)
|
||||||
|
} else {
|
||||||
|
Tooltip::simple(label, cx)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.on_click(move |_, _, cx| toggle_deafen(&Default::default(), cx))
|
||||||
|
.into_any_element(),
|
||||||
|
);
|
||||||
|
|
||||||
|
if can_use_microphone && screen_sharing_supported {
|
||||||
|
children.push(
|
||||||
|
IconButton::new("screen-share", ui::IconName::Screen)
|
||||||
|
.style(ButtonStyle::Subtle)
|
||||||
|
.icon_size(IconSize::Small)
|
||||||
|
.toggle_state(is_screen_sharing)
|
||||||
|
.selected_style(ButtonStyle::Tinted(TintColor::Accent))
|
||||||
|
.tooltip(Tooltip::text(if is_screen_sharing {
|
||||||
|
"Stop Sharing Screen"
|
||||||
|
} else {
|
||||||
|
"Share Screen"
|
||||||
|
}))
|
||||||
|
.on_click(move |_, window, cx| {
|
||||||
|
toggle_screen_sharing(&Default::default(), window, cx)
|
||||||
|
})
|
||||||
|
.into_any_element(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
children.push(div().pr_2().into_any_element());
|
children.push(div().pr_2().into_any_element());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue