Rename on/off states to active/inactive

This commit is contained in:
Piotr Osiewicz 2023-06-14 15:12:38 +02:00 committed by Mikayla Maki
parent e92015b12f
commit 0256f89dd6
No known key found for this signature in database
10 changed files with 47 additions and 36 deletions

View file

@ -499,9 +499,9 @@ impl View for PanelButtons {
.with_child(
MouseEventHandler::<Self, _>::new(panel_ix, cx, |state, cx| {
let toggle_state = if is_active {
ToggleState::On
ToggleState::Active
} else {
ToggleState::Off
ToggleState::Inactive
};
let style = button_style.in_state(toggle_state);

View file

@ -231,9 +231,9 @@ fn nav_button<A: Action, F: 'static + Fn(&mut Toolbar, &mut ViewContext<Toolbar>
) -> AnyElement<Toolbar> {
MouseEventHandler::<A, _>::new(0, cx, |state, _| {
let style = if enabled {
style.off_state().style_for(state)
style.inactive_state().style_for(state)
} else {
style.off_state().disabled_style()
style.inactive_state().disabled_style()
};
Svg::new(svg_path)
.with_color(style.color)