improv(theme): list_button style
This adds a new `list_button` field to theme, which makes ListItem buttons stay transparent when pressed. It's essentially a mix of `text_button` and `background.component`, without hover highlights (as per designs).
This commit is contained in:
parent
99c038a66a
commit
564ef834ce
2 changed files with 16 additions and 21 deletions
|
|
@ -75,6 +75,8 @@ pub struct Theme {
|
|||
pub icon_button: Component,
|
||||
/// link button element colors
|
||||
pub link_button: Component,
|
||||
/// list button element colors
|
||||
pub list_button: Component,
|
||||
/// text button element colors
|
||||
pub text_button: Component,
|
||||
/// button component styling
|
||||
|
|
@ -1285,6 +1287,15 @@ impl ThemeBuilder {
|
|||
component.on_disabled = over(component.on.with_alpha(0.5), component.base);
|
||||
component
|
||||
},
|
||||
list_button: Component::component(
|
||||
Srgba::new(0.0, 0.0, 0.0, 0.0),
|
||||
accent,
|
||||
on_bg_component,
|
||||
Srgba::new(0.0, 0.0, 0.0, 0.0),
|
||||
button_pressed_overlay,
|
||||
is_high_contrast,
|
||||
control_steps_array[8],
|
||||
),
|
||||
success: Component::colored_component(
|
||||
success,
|
||||
control_steps_array[0],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue