diff options
-rw-r--r-- | dw/image.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dw/image.cc b/dw/image.cc index 0a690999..a76d999b 100644 --- a/dw/image.cc +++ b/dw/image.cc @@ -209,7 +209,9 @@ void Image::sizeAllocateImpl (core::Allocation *allocation) " = %d - %d = %d\n", this->getHeight(), getStyle()->boxDiffHeight(), this->getHeight() - getStyle()->boxDiffHeight()); #endif - if (buffer && (getContentWidth () > 0 || getContentHeight () > 0)) { + if (buffer && + (allocation->width - dx > 0 || + allocation->ascent + allocation->descent - dy > 0)) { // Zero content size : simply wait... // Only one dimension: naturally scale oldBuffer = buffer; |