]> git.lyx.org Git - features.git/commitdiff
Avoid narrow boxes when using \width as box width unit
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 5 Apr 2016 08:43:16 +0000 (10:43 +0200)
committerRichard Heck <rgheck@lyx.org>
Sat, 28 May 2016 21:43:01 +0000 (17:43 -0400)
When the box has a special width, one should not consider that as a fixed width. Otherwise, due to implementation quirks, the width will be set on screen as 1 inch.

A better solution would be to actually set the width by taking in account the contents width, height ans total height. This is not very difficult, but I do not know whether it would workout well in the work area.

Fixes bug #10048.

src/insets/InsetBox.cpp

index eee16fe6472912751eb5e7daf013c529bc778ddb..ea18afa0d9f2d369f7f10f2dc58565f050f2c878 100644 (file)
@@ -169,7 +169,7 @@ void InsetBox::setButtonLabel()
 
 bool InsetBox::hasFixedWidth() const
 {
-       return !params_.width.empty();
+       return !params_.width.empty() && params_.special == "none";
 }