fix: layout didn't call Widget constructor.
This commit is contained in:
parent
09dffb63dd
commit
85837167fe
2 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,7 @@ namespace bwidgets
|
|||
VERTICAL
|
||||
} alignment;
|
||||
|
||||
AlignedLayout(Alignment align) noexcept : alignment(align) {}
|
||||
AlignedLayout(Alignment align, Widget* p = nullptr) noexcept : Layout(p), alignment(align) {}
|
||||
|
||||
[[nodiscard]] auto size() const noexcept -> Size override;
|
||||
};
|
||||
|
|
|
@ -30,6 +30,8 @@ namespace bwidgets
|
|||
|
||||
Size margins = default_margins;
|
||||
|
||||
Layout(Widget* p = nullptr) : Widget(p) {}
|
||||
|
||||
auto handle_event(const SDL_Event&) -> Layout* override;
|
||||
[[nodiscard]] auto size() const noexcept -> Size override = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue