13
0

canvas; fix thinko and typo in Rectangle size_request()

This commit is contained in:
Paul Davis 2024-11-05 15:02:06 -07:00
parent b3a22a024c
commit ea64eb87c5

View File

@ -163,11 +163,15 @@ Rectangle::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) con
void void
Rectangle::size_request (double& w, double& h) const Rectangle::size_request (double& w, double& h) const
{ {
if (_requested_width || _requested_width) { if (_requested_width > 0.) {
w = _requested_width; w = _requested_width;
h = _requested_height;
} else { } else {
w = _rect.width(); w = _rect.width();
}
if (_requested_height > 0.) {
h = _requested_height;
} else {
h = _rect.height(); h = _rect.height();
} }
} }