Fix alignment of text within insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20083 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-05 22:08:41 +00:00
parent d9d7af7019
commit 95e09581c5

View File

@ -250,7 +250,9 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
// Draw button first -- top, left or only
Dimension dimc = dimensionCollapsed();
int const top = y - ascent() + TEXT_TO_INSET_OFFSET;
TextMetrics const & tm = pi.base.bv->textMetrics(&text_);
int const top = y - tm.ascent();
if (geometry() == TopButton ||
geometry() == LeftButton ||
geometry() == ButtonOnly) {