Add special styling for bypass buttons
This commit is contained in:
parent
7d4351e4fa
commit
3f0922b5c0
|
@ -43,6 +43,15 @@ param-button:checked {
|
|||
transition: background-color 0.1 0;
|
||||
}
|
||||
|
||||
param-button:hover {
|
||||
background-color: #ffaba51a;
|
||||
transition: background-color 0.1 0;
|
||||
}
|
||||
param-button.bypass:checked {
|
||||
background-color: #ffaba5;
|
||||
transition: background-color 0.1 0;
|
||||
}
|
||||
|
||||
param-button label {
|
||||
/* TODO */
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ mod resize_handle;
|
|||
pub mod util;
|
||||
|
||||
pub use generic_ui::GenericUi;
|
||||
pub use param_button::ParamButton;
|
||||
pub use param_button::{ParamButton, ParamButtonExt};
|
||||
pub use param_slider::{ParamSlider, ParamSliderExt, ParamSliderStyle};
|
||||
pub use peak_meter::PeakMeter;
|
||||
pub use resize_handle::ResizeHandle;
|
||||
|
|
|
@ -85,3 +85,15 @@ impl View for ParamButton {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Extension methods for [`ParamButton`] handles.
|
||||
pub trait ParamButtonExt {
|
||||
/// Change the colors scheme for a bypass button. This simply adds the `bypass` class.
|
||||
fn for_bypass(self) -> Self;
|
||||
}
|
||||
|
||||
impl ParamButtonExt for Handle<'_, ParamButton> {
|
||||
fn for_bypass(self) -> Self {
|
||||
self.class("bypass")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue