Skip to content

Commit

Permalink
better frame layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Mar 5, 2024
1 parent a90071c commit 3247d96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions haxe/ui/_module/styles/default/frames.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@

.frame-contents {
padding: 10px;
padding-top: 5px;
}

.frame.no-padding .frame-contents {
padding: 1px;
padding-top: 1px;
}

.frame-title {
Expand Down
4 changes: 2 additions & 2 deletions haxe/ui/containers/Frame.hx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private class Builder extends CompositeBuilder {
_frame.addComponent(_contents);

_label = new Label();
_label.text = "My Frame";
_label.text = "";
_label.id = "frame-title";
_label.addClass("frame-title");
_label.includeInLayout = false;
Expand Down Expand Up @@ -245,7 +245,7 @@ private class Layout extends DefaultLayout {
contents.width = border.width;
}
if (_component.autoHeight == false) {
contents.height = border.height;
contents.height = border.height - (label.height / 2);
}

var labelOffsetLeft:Float = 0;
Expand Down

0 comments on commit 3247d96

Please sign in to comment.