Update collab_titlebar_item.rs

This commit is contained in:
Nate Butler 2023-12-01 10:52:11 -05:00
parent 88188b0c30
commit ab75dbe7af

View file

@ -38,7 +38,7 @@ use gpui::{
use project::{Project, RepositoryEntry}; use project::{Project, RepositoryEntry};
use theme::ActiveTheme; use theme::ActiveTheme;
use ui::{ use ui::{
h_stack, popover_menu, prelude::*, Avatar, Button, ButtonLike, ButtonStyle2, ContextMenu, Icon, h_stack, popover_menu, prelude::*, Avatar, Button, ButtonLike, ButtonStyle, ContextMenu, Icon,
IconButton, IconElement, KeyBinding, Tooltip, IconButton, IconElement, KeyBinding, Tooltip,
}; };
use util::ResultExt; use util::ResultExt;
@ -204,11 +204,11 @@ impl Render for CollabTitlebarItem {
"toggle_sharing", "toggle_sharing",
if is_shared { "Unshare" } else { "Share" }, if is_shared { "Unshare" } else { "Share" },
) )
.style(ButtonStyle2::Subtle), .style(ButtonStyle::Subtle),
) )
.child( .child(
IconButton::new("leave-call", ui::Icon::Exit) IconButton::new("leave-call", ui::Icon::Exit)
.style(ButtonStyle2::Subtle) .style(ButtonStyle::Subtle)
.on_click({ .on_click({
let workspace = workspace.clone(); let workspace = workspace.clone();
move |_, cx| { move |_, cx| {
@ -233,7 +233,7 @@ impl Render for CollabTitlebarItem {
ui::Icon::Mic ui::Icon::Mic
}, },
) )
.style(ButtonStyle2::Subtle) .style(ButtonStyle::Subtle)
.selected(is_muted) .selected(is_muted)
.on_click({ .on_click({
let workspace = workspace.clone(); let workspace = workspace.clone();
@ -248,7 +248,7 @@ impl Render for CollabTitlebarItem {
) )
.child( .child(
IconButton::new("mute-sound", speakers_icon) IconButton::new("mute-sound", speakers_icon)
.style(ButtonStyle2::Subtle) .style(ButtonStyle::Subtle)
.selected(is_deafened.clone()) .selected(is_deafened.clone())
.tooltip(move |cx| { .tooltip(move |cx| {
Tooltip::with_meta( Tooltip::with_meta(
@ -271,7 +271,7 @@ impl Render for CollabTitlebarItem {
) )
.child( .child(
IconButton::new("screen-share", ui::Icon::Screen) IconButton::new("screen-share", ui::Icon::Screen)
.style(ButtonStyle2::Subtle) .style(ButtonStyle::Subtle)
.on_click(move |_, cx| { .on_click(move |_, cx| {
workspace workspace
.update(cx, |this, cx| { .update(cx, |this, cx| {
@ -300,7 +300,7 @@ impl Render for CollabTitlebarItem {
.color(Color::Muted), .color(Color::Muted),
), ),
) )
.style(ButtonStyle2::Subtle) .style(ButtonStyle::Subtle)
.tooltip(move |cx| Tooltip::text("Toggle User Menu", cx)), .tooltip(move |cx| Tooltip::text("Toggle User Menu", cx)),
) )
.anchor(gpui::AnchorCorner::TopRight), .anchor(gpui::AnchorCorner::TopRight),
@ -312,7 +312,7 @@ impl Render for CollabTitlebarItem {
// IconElement::new(Icon::ChevronDown).color(Color::Muted), // IconElement::new(Icon::ChevronDown).color(Color::Muted),
// ), // ),
// ) // )
// .style(ButtonStyle2::Subtle) // .style(ButtonStyle::Subtle)
// .tooltip(move |cx| Tooltip::text("Toggle User Menu", cx)), // .tooltip(move |cx| Tooltip::text("Toggle User Menu", cx)),
// ) // )
}) })
@ -489,7 +489,7 @@ impl CollabTitlebarItem {
format!("{user_name} ({})", !is_shared), format!("{user_name} ({})", !is_shared),
) )
.color(Color::Player(participant_index)) .color(Color::Player(participant_index))
.style(ButtonStyle2::Subtle) .style(ButtonStyle::Subtle)
.tooltip(move |cx| Tooltip::text("Toggle following", cx)), .tooltip(move |cx| Tooltip::text("Toggle following", cx)),
), ),
) )
@ -509,7 +509,7 @@ impl CollabTitlebarItem {
div().border().border_color(gpui::red()).child( div().border().border_color(gpui::red()).child(
Button::new("project_name_trigger", name) Button::new("project_name_trigger", name)
.style(ButtonStyle2::Subtle) .style(ButtonStyle::Subtle)
.tooltip(move |cx| Tooltip::text("Recent Projects", cx)), .tooltip(move |cx| Tooltip::text("Recent Projects", cx)),
) )
} }
@ -533,7 +533,7 @@ impl CollabTitlebarItem {
Some( Some(
div().border().border_color(gpui::red()).child( div().border().border_color(gpui::red()).child(
Button::new("project_branch_trigger", branch_name) Button::new("project_branch_trigger", branch_name)
.style(ButtonStyle2::Subtle) .style(ButtonStyle::Subtle)
.tooltip(move |cx| { .tooltip(move |cx| {
cx.build_view(|_| { cx.build_view(|_| {
Tooltip::new("Recent Branches") Tooltip::new("Recent Branches")