Skip to content

Commit

Permalink
button icon should inherit state from button on creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Dec 10, 2024
1 parent 67a3616 commit b5cce4e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions haxe/ui/components/Button.hx
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,12 @@ private class IconBehaviour extends DataBehaviour {
if (icon == null) {
icon = new Image();
icon.addClass("icon");
if (_component.hasClass(":hover")) {
icon.addClass(":hover");
}
if (_component.hasClass(":down")) {
icon.addClass(":down");
}
icon.id = "button-icon";
_component.addComponentAt(icon, 0);
_component.invalidateComponentStyle(true);
Expand Down

0 comments on commit b5cce4e

Please sign in to comment.