mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Add styles for button
This commit is contained in:
parent
6c676121f2
commit
4b52ff65c1
@ -550,10 +550,7 @@ impl CollabTitlebarItem {
|
|||||||
|
|
||||||
let titlebar = &theme.workspace.titlebar;
|
let titlebar = &theme.workspace.titlebar;
|
||||||
MouseEventHandler::<LeaveCall, Self>::new(0, cx, |state, _| {
|
MouseEventHandler::<LeaveCall, Self>::new(0, cx, |state, _| {
|
||||||
let style = titlebar
|
let style = titlebar.leave_call_button.style_for(state);
|
||||||
.toggle_speakers_button
|
|
||||||
.in_state(false)
|
|
||||||
.style_for(state);
|
|
||||||
Svg::new(icon)
|
Svg::new(icon)
|
||||||
.with_color(style.color)
|
.with_color(style.color)
|
||||||
.constrained()
|
.constrained()
|
||||||
|
@ -135,6 +135,7 @@ pub struct Titlebar {
|
|||||||
pub toggle_contacts_button: Toggleable<Interactive<IconButton>>,
|
pub toggle_contacts_button: Toggleable<Interactive<IconButton>>,
|
||||||
pub toggle_microphone_button: Toggleable<Interactive<IconButton>>,
|
pub toggle_microphone_button: Toggleable<Interactive<IconButton>>,
|
||||||
pub toggle_speakers_button: Toggleable<Interactive<IconButton>>,
|
pub toggle_speakers_button: Toggleable<Interactive<IconButton>>,
|
||||||
|
pub leave_call_button: Interactive<IconButton>,
|
||||||
pub user_menu_button: Toggleable<Interactive<IconButton>>,
|
pub user_menu_button: Toggleable<Interactive<IconButton>>,
|
||||||
pub toggle_contacts_badge: ContainerStyle,
|
pub toggle_contacts_badge: ContainerStyle,
|
||||||
}
|
}
|
||||||
|
@ -407,6 +407,24 @@ export default function workspace(colorScheme: ColorScheme) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
leaveCallButton: interactive({
|
||||||
|
base: {
|
||||||
|
margin: { left: itemSpacing },
|
||||||
|
cornerRadius: 6,
|
||||||
|
color: foreground(layer, "variant"),
|
||||||
|
iconWidth: 14,
|
||||||
|
buttonWidth: 20,
|
||||||
|
},
|
||||||
|
state: {
|
||||||
|
clicked: {
|
||||||
|
background: background(layer, "variant", "pressed"),
|
||||||
|
},
|
||||||
|
hovered: {
|
||||||
|
background: background(layer, "variant", "hovered"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
|
||||||
userMenuButton: merge(titlebarButton, {
|
userMenuButton: merge(titlebarButton, {
|
||||||
inactive: {
|
inactive: {
|
||||||
default: {
|
default: {
|
||||||
|
Loading…
Reference in New Issue
Block a user