]> git.lyx.org Git - features.git/commitdiff
Fix caption text y-positioning
authorAbdelrazak Younes <younes@lyx.org>
Wed, 5 Sep 2007 20:54:15 +0000 (20:54 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 5 Sep 2007 20:54:15 +0000 (20:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20079 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetCaption.cpp

index 7b25e463d1723345b9cedcc3e9579c46633944c8..3505728c937d0fa39e588a4777f794640e1dcaa7 100644 (file)
@@ -163,7 +163,8 @@ void InsetCaption::draw(PainterInfo & pi, int x, int y) const
        labelwidth_ = pi.pain.text(x, y, full_label_, pi.base.font);
        // add some space to separate the label from the inset text
        labelwidth_ += 2 * TEXT_TO_INSET_OFFSET;
-       InsetText::draw(pi, x + labelwidth_, y);
+       int const ty  = y - ascent() + TEXT_TO_INSET_OFFSET;
+       InsetText::draw(pi, x + labelwidth_, ty);
        setPosCache(pi, x, y);
 }