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
Rectangle::size_request (double& w, double& h) const
{
if (_requested_width || _requested_width) {
if (_requested_width > 0.) {
w = _requested_width;
h = _requested_height;
} else {
w = _rect.width();
}
if (_requested_height > 0.) {
h = _requested_height;
} else {
h = _rect.height();
}
}