]> git.lyx.org Git - features.git/commitdiff
Fix InsetBox::contentAlignment()
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 11 May 2018 13:11:06 +0000 (15:11 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 11 May 2018 16:44:17 +0000 (18:44 +0200)
Some cases where alignment is possible were missing.

Candidate for 2.3.x.

(cherry picked from commit de67b68b1dc140321e5d0e2e6b4507c972703744)

src/insets/InsetBox.cpp
status.23x

index c593c4c759b6ed311ad584b05c47bbd8d1bc6896..9d60ffcfae15173f943d475c87b782c18596f1df 100644 (file)
@@ -227,7 +227,9 @@ ColorCode InsetBox::backgroundColor(PainterInfo const &) const
 
 LyXAlignment InsetBox::contentAlignment() const
 {
-       if (!params_.use_makebox)
+       // Custom horizontal alignment is only allowed with a fixed width
+       // and if either makebox or no inner box are used
+       if (params_.width.empty() || !(params_.use_makebox || !params_.inner_box))
                return LYX_ALIGN_NONE;
 
        // The default value below is actually irrelevant
index 881f7cd8cb6ee7deb68a6aea7088cf125d973737..1b4acac92afe5f743689c78203924def6e03d73e 100644 (file)
@@ -248,6 +248,8 @@ What's new
 
 - Fix duplicate, disabled "Separated <Environment> Below" menu item.
 
+- Fix horizontal alignment of some Box types on screen.
+
 
 * INTERNALS