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
|
@ -1410,7 +1410,7 @@ impl Pane {
|
|||
pub fn render_tab_bar_button<F: 'static + Fn(&mut Pane, &mut EventContext<Pane>)>(
|
||||
index: usize,
|
||||
icon: &'static str,
|
||||
active: bool,
|
||||
is_active: bool,
|
||||
tooltip: Option<(String, Option<Box<dyn Action>>)>,
|
||||
cx: &mut ViewContext<Pane>,
|
||||
on_click: F,
|
||||
|
@ -1420,7 +1420,7 @@ impl Pane {
|
|||
|
||||
let mut button = MouseEventHandler::<TabBarButton, _>::new(index, cx, |mouse_state, cx| {
|
||||
let theme = &settings::get::<ThemeSettings>(cx).theme.workspace.tab_bar;
|
||||
let style = theme.pane_button.style_for(mouse_state, active);
|
||||
let style = theme.pane_button.in_state(is_active).style_for(mouse_state);
|
||||
Svg::new(icon)
|
||||
.with_color(style.color)
|
||||
.constrained()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue