From 75177f3ef87ec9d6051c1d81ca1ed2059f8a438d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 5 Nov 2024 14:53:22 -0700 Subject: [PATCH] canvas: honor explicit size request for Rectangle --- libs/canvas/rectangle.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/canvas/rectangle.cc b/libs/canvas/rectangle.cc index 65a045ce8f..eb7c81b9b6 100644 --- a/libs/canvas/rectangle.cc +++ b/libs/canvas/rectangle.cc @@ -163,8 +163,13 @@ Rectangle::render (Rect const & area, Cairo::RefPtr context) con void Rectangle::size_request (double& w, double& h) const { - w = _rect.width(); - h = _rect.height(); + if (_requested_width || _requested_width) { + w = _requested_width; + h = _requested_height; + } else { + w = _rect.width(); + h = _rect.height(); + } } void