]> git.lyx.org Git - lyx.git/commitdiff
* InsetCollapsable::metrics(): Put back the test previous to revision 14472 for openi...
authorAbdelrazak Younes <younes@lyx.org>
Sat, 1 Sep 2007 23:01:21 +0000 (23:01 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 1 Sep 2007 23:01:21 +0000 (23:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19985 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetCollapsable.cpp

index d92e5d47f68521051f201345300ad5f2356eb594..c3f6e434acc3cabec705844085093ffc2c2833c2 100644 (file)
@@ -209,9 +209,7 @@ bool InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const
                if (geometry() == TopButton
                 || geometry() == LeftButton) {
                        InsetText::metrics(mi, textdim_);
-                       // This expression should not contain mi.base.texwidth
-                       openinlined_ = !hasFixedWidth()
-                               && textdim_.wid < 0.5 * mi.base.bv->workWidth();
+                       openinlined_ = (textdim_.wid + 2 * dim.wid) <= mi.base.textwidth;
                        if (openinlined_) {
                                // Correct for button width.
                                dim.wid += textdim_.wid;