mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 15:44:20 +03:00
WIP BROKEN
This commit is contained in:
parent
a5cb4c6d52
commit
beffe6f6a9
@ -1103,9 +1103,12 @@ impl CollabPanel {
|
|||||||
enum AddContact {}
|
enum AddContact {}
|
||||||
let button = match section {
|
let button = match section {
|
||||||
Section::ActiveCall => Some(
|
Section::ActiveCall => Some(
|
||||||
MouseEventHandler::<AddContact, Self>::new(0, cx, |_, _| {
|
MouseEventHandler::<AddContact, Self>::new(0, cx, |state, _| {
|
||||||
render_icon_button(
|
render_icon_button(
|
||||||
theme.collab_panel.leave_call_button.in_state(is_selected),
|
theme
|
||||||
|
.collab_panel
|
||||||
|
.leave_call_button
|
||||||
|
.style_for(is_selected, state),
|
||||||
"icons/radix/exit.svg",
|
"icons/radix/exit.svg",
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -1122,9 +1125,12 @@ impl CollabPanel {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Section::Contacts => Some(
|
Section::Contacts => Some(
|
||||||
MouseEventHandler::<LeaveCallContactList, Self>::new(0, cx, |_, _| {
|
MouseEventHandler::<LeaveCallContactList, Self>::new(0, cx, |state, _| {
|
||||||
render_icon_button(
|
render_icon_button(
|
||||||
theme.collab_panel.add_contact_button.in_state(is_selected),
|
theme
|
||||||
|
.collab_panel
|
||||||
|
.add_contact_button
|
||||||
|
.style_for(is_selected, state),
|
||||||
"icons/plus_16.svg",
|
"icons/plus_16.svg",
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -1141,9 +1147,12 @@ impl CollabPanel {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Section::Channels => Some(
|
Section::Channels => Some(
|
||||||
MouseEventHandler::<AddChannel, Self>::new(0, cx, |_, _| {
|
MouseEventHandler::<AddChannel, Self>::new(0, cx, |state, _| {
|
||||||
render_icon_button(
|
render_icon_button(
|
||||||
theme.collab_panel.add_contact_button.in_state(is_selected),
|
theme
|
||||||
|
.collab_panel
|
||||||
|
.add_contact_button
|
||||||
|
.style_for(is_selected, state),
|
||||||
"icons/plus_16.svg",
|
"icons/plus_16.svg",
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -226,9 +226,9 @@ pub struct CollabPanel {
|
|||||||
pub channel_modal: ChannelModal,
|
pub channel_modal: ChannelModal,
|
||||||
pub user_query_editor: FieldEditor,
|
pub user_query_editor: FieldEditor,
|
||||||
pub user_query_editor_height: f32,
|
pub user_query_editor_height: f32,
|
||||||
pub leave_call_button: Toggleable<IconButton>,
|
pub leave_call_button: Toggleable<Interactive<IconButton>>,
|
||||||
pub add_contact_button: Toggleable<IconButton>,
|
pub add_contact_button: Toggleable<Interactive<IconButton>>,
|
||||||
pub add_channel_button: Toggleable<IconButton>,
|
pub add_channel_button: Toggleable<Interactive<IconButton>>,
|
||||||
pub header_row: ContainedText,
|
pub header_row: ContainedText,
|
||||||
pub subheader_row: Toggleable<Interactive<ContainedText>>,
|
pub subheader_row: Toggleable<Interactive<ContainedText>>,
|
||||||
pub leave_call: Interactive<ContainedText>,
|
pub leave_call: Interactive<ContainedText>,
|
||||||
|
@ -8,6 +8,7 @@ import {
|
|||||||
import { interactive, toggleable } from "../element"
|
import { interactive, toggleable } from "../element"
|
||||||
import { useTheme } from "../theme"
|
import { useTheme } from "../theme"
|
||||||
import channel_modal from "./channel_modal"
|
import channel_modal from "./channel_modal"
|
||||||
|
import { icon_button, toggleable_icon_button } from "../component/icon_button"
|
||||||
|
|
||||||
|
|
||||||
export default function contacts_panel(): any {
|
export default function contacts_panel(): any {
|
||||||
@ -51,19 +52,7 @@ export default function contacts_panel(): any {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerButton = toggleable({
|
const headerButton = toggleable_icon_button(theme, {})
|
||||||
base: {
|
|
||||||
color: foreground(layer, "on"),
|
|
||||||
button_width: 28,
|
|
||||||
icon_width: 16,
|
|
||||||
},
|
|
||||||
state: {
|
|
||||||
active: {
|
|
||||||
background: background(layer, "active"),
|
|
||||||
corner_radius: 8,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
channel_modal: channel_modal(),
|
channel_modal: channel_modal(),
|
||||||
|
Loading…
Reference in New Issue
Block a user