Give hover state to picker items, keystrokes in command palette
This commit is contained in:
parent
a60c75e343
commit
8481834847
20 changed files with 269 additions and 288 deletions
|
@ -1574,11 +1574,11 @@ impl Workspace {
|
|||
} else {
|
||||
Some(
|
||||
MouseEventHandler::new::<Authenticate, _, _>(0, cx, |state, _| {
|
||||
let style = if state.hovered {
|
||||
&theme.workspace.titlebar.sign_in_prompt.hover()
|
||||
} else {
|
||||
&theme.workspace.titlebar.sign_in_prompt.default
|
||||
};
|
||||
let style = theme
|
||||
.workspace
|
||||
.titlebar
|
||||
.sign_in_prompt
|
||||
.style_for(state, false);
|
||||
Label::new("Sign in".to_string(), style.text.clone())
|
||||
.contained()
|
||||
.with_style(style.container)
|
||||
|
@ -1649,18 +1649,11 @@ impl Workspace {
|
|||
{
|
||||
Some(
|
||||
MouseEventHandler::new::<ToggleShare, _, _>(0, cx, |state, cx| {
|
||||
let style = &theme.workspace.titlebar.share_icon;
|
||||
let style = if self.project().read(cx).is_shared() {
|
||||
if state.hovered {
|
||||
style.active_hover()
|
||||
} else {
|
||||
&style.active()
|
||||
}
|
||||
} else if state.hovered {
|
||||
&style.active()
|
||||
} else {
|
||||
&style.default
|
||||
};
|
||||
let style = &theme
|
||||
.workspace
|
||||
.titlebar
|
||||
.share_icon
|
||||
.style_for(state, self.project().read(cx).is_shared());
|
||||
Svg::new("icons/share.svg")
|
||||
.with_color(style.color)
|
||||
.constrained()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue