aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/controls/button.cpp')
-rw-r--r--src/ui/controls/button.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/controls/button.cpp b/src/ui/controls/button.cpp
index 630c0c39..2ecc9f14 100644
--- a/src/ui/controls/button.cpp
+++ b/src/ui/controls/button.cpp
@@ -29,6 +29,16 @@ namespace cru::ui::controls
border_delegate_->Draw(device_context, GetSize());
}
+ Size Button::OnMeasure(const Size& available_size)
+ {
+ return Control::DefaultMeasureWithPadding(available_size, border_delegate_->GetBorderThickness());
+ }
+
+ void Button::OnLayout(const Rect& rect)
+ {
+ Control::DefaultLayoutWithPadding(rect, border_delegate_->GetBorderThickness());
+ }
+
void Button::OnMouseClickBegin(MouseButton button)
{
border_delegate_->SetBorderProperty(pressed_border_border_);