Skip to content

Commit

Permalink
fix size
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Jun 6, 2024
1 parent 9687447 commit 043f921
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ interface ImGuiLayout {
[Value] ImVec2 getAbsoluteSize();
[Value] ImVec2 getAbsoluteSizePadding();
[Value] ImVec2 getContentSize();
[Value] ImVec2 getContentSizePadding();
[Value] ImVec2 getPositionPadding();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ ImVec2 ImGuiLayout::getAbsoluteSize() {
}

ImVec2 ImGuiLayout::getContentSize() {
return ImVec2(position.x + contentSize.x, position.y + contentSize.y);
return ImVec2(contentSize.x, contentSize.y);
}

ImVec2 ImGuiLayout::getAbsoluteSizePadding() {
return ImVec2(position.x + size.x - paddingRight, position.y + size.y - paddingBottom);
}

ImVec2 ImGuiLayout::getContentSizePadding() {
return ImVec2(position.x + contentSize.x - paddingRight, position.y + contentSize.y - paddingBottom);
return ImVec2(contentSize.x - paddingRight, contentSize.y - paddingBottom);
}

ImVec2 ImGuiLayout::getPositionPadding() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ struct ImGuiLayout
ImVec2 getAbsoluteSize();
ImVec2 getContentSize();
ImVec2 getAbsoluteSizePadding();
ImVec2 getContentSizePadding();
ImVec2 getPositionPadding();
ImRect getBoundingBox();

Expand Down

0 comments on commit 043f921

Please sign in to comment.