From e17bd37955149636dfd3f1ccfe8375f11d3acbb7 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 5 Apr 2016 10:43:16 +0200 Subject: [PATCH] Avoid narrow boxes when using \width as box width unit 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 | 2 +- status.22x | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index eee16fe647..ea18afa0d9 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -169,7 +169,7 @@ void InsetBox::setButtonLabel() bool InsetBox::hasFixedWidth() const { - return !params_.width.empty(); + return !params_.width.empty() && params_.special == "none"; } diff --git a/status.22x b/status.22x index 872d74512b..a5f24f9e48 100644 --- a/status.22x +++ b/status.22x @@ -46,6 +46,7 @@ What's new - When a counter is stepped, reset recursively all subcounters (bug #10063). +- Fix on screen narrow box when using \width as box width unit (bug 10048). * INTERNALS