Skip to content

Commit

Permalink
fix panel content size when using fixed widths
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Oct 29, 2024
1 parent 9a97048 commit fb2c43f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions haxe/ui/containers/Panel.hx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,23 @@ class Panel extends VBox {

#if (haxeui_openfl || haxeui_nme || haxeui_flixel)

public override function set_width(value:Float):Float {
contentContainer.percentWidth = 100;
return super.set_width(value);
}

public override function set_height(value:Float):Float {
contentContainer.percentHeight = 100;
return super.set_height(value);
}

#else

public override function set_width(value:Null<Float>):Null<Float> {
contentContainer.percentWidth = 100;
return super.set_width(value);
}

public override function set_height(value:Null<Float>):Null<Float> {
contentContainer.percentHeight = 100;
return super.set_height(value);
Expand Down

0 comments on commit fb2c43f

Please sign in to comment.