Skip to content

Commit

Permalink
isIconRelevant should take visibility into account
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Dec 5, 2024
1 parent a409aba commit 453c1d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haxe/ui/components/Button.hx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class ButtonLayout extends DefaultLayout {

private inline function isIconRelevant() {
var icon:Image = component.findComponent("button-icon", false);
return icon != null && icon.componentWidth != 0 && icon.componentHeight !=0 && (iconPosition == "far-right" || iconPosition == "far-left" || iconPosition == "left" || iconPosition == "right" || iconPosition == "center-right" || iconPosition == "center-left");
return icon != null && icon.hidden == false && icon.componentWidth != 0 && icon.componentHeight !=0 && (iconPosition == "far-right" || iconPosition == "far-left" || iconPosition == "left" || iconPosition == "right" || iconPosition == "center-right" || iconPosition == "center-left");
}

private override function repositionChildren() {
Expand Down

0 comments on commit 453c1d4

Please sign in to comment.