Respect label_color for Buttons (#3469)
This PR makes `Button`s respect the `label_color` that is specified, provided they are not disabled or selected. Release Notes: - N/A
This commit is contained in:
@@ -79,7 +79,7 @@ impl RenderOnce for Button {
|
||||
} else if self.base.selected {
|
||||
Color::Selected
|
||||
} else {
|
||||
Color::Default
|
||||
self.label_color.unwrap_or_default()
|
||||
};
|
||||
|
||||
self.base.child(
|
||||
|
||||
@@ -14,6 +14,10 @@ impl Render for ButtonStory {
|
||||
.child(Story::title_for::<Button>())
|
||||
.child(Story::label("Default"))
|
||||
.child(Button::new("default_filled", "Click me"))
|
||||
.child(Story::label("Selected"))
|
||||
.child(Button::new("selected_filled", "Click me").selected(true))
|
||||
.child(Story::label("With `label_color`"))
|
||||
.child(Button::new("filled_with_label_color", "Click me").color(Color::Created))
|
||||
.child(Story::label("Default (Subtle)"))
|
||||
.child(Button::new("default_subtle", "Click me").style(ButtonStyle::Subtle))
|
||||
.child(Story::label("Default (Transparent)"))
|
||||
|
||||
Reference in New Issue
Block a user