Split out Interactive<T> into Toggle<T> and Interactive<T>
This commit is contained in:
parent
6ed86781b2
commit
e92015b12f
35 changed files with 223 additions and 144 deletions
|
@ -1253,7 +1253,10 @@ impl ProjectPanel {
|
|||
let show_editor = details.is_editing && !details.is_processing;
|
||||
|
||||
MouseEventHandler::<Self, _>::new(entry_id.to_usize(), cx, |state, cx| {
|
||||
let mut style = entry_style.style_for(state, details.is_selected).clone();
|
||||
let mut style = entry_style
|
||||
.in_state(details.is_selected)
|
||||
.style_for(state)
|
||||
.clone();
|
||||
|
||||
if cx
|
||||
.global::<DragAndDrop<Workspace>>()
|
||||
|
@ -1264,7 +1267,7 @@ impl ProjectPanel {
|
|||
.filter(|destination| details.path.starts_with(destination))
|
||||
.is_some()
|
||||
{
|
||||
style = entry_style.active.clone().unwrap();
|
||||
style = entry_style.on_state().default.clone();
|
||||
}
|
||||
|
||||
let row_container_style = if show_editor {
|
||||
|
@ -1405,9 +1408,9 @@ impl View for ProjectPanel {
|
|||
let button_style = theme.open_project_button.clone();
|
||||
let context_menu_item_style = theme::current(cx).context_menu.item.clone();
|
||||
move |state, cx| {
|
||||
let button_style = button_style.style_for(state, false).clone();
|
||||
let button_style = button_style.style_for(state).clone();
|
||||
let context_menu_item =
|
||||
context_menu_item_style.style_for(state, true).clone();
|
||||
context_menu_item_style.on_state().style_for(state).clone();
|
||||
|
||||
theme::ui::keystroke_label(
|
||||
"Open a project",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue