aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/textblock.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 1db33eb1..9b4d5380 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -793,8 +793,8 @@ int Textblock::getAvailWidthOfChild (Widget *child, bool forceValue)
!mustBeWidenedToAvailWidth ()) {
core::Extremes extremes;
getExtremes (&extremes);
- if (width > extremes.maxWidth)
- width = extremes.maxWidth;
+ if (width > extremes.maxWidth - boxDiffWidth () - leftInnerPadding)
+ width = extremes.maxWidth - boxDiffWidth () - leftInnerPadding;
}
DBG_OBJ_MSGF ("resize", 1, "=> %d", width);