From 29c112f031506cc33a51237bbd9c7be0d65bcc65 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 3 Jan 2002 13:02:43 +0000 Subject: [PATCH] cosmetics: move numerator and denominator in fravctions closer together git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3283 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_fracinset.C | 8 ++++---- src/mathed/math_stackrelinset.C | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mathed/math_fracinset.C b/src/mathed/math_fracinset.C index c1f8f23ff4..5b560c88a3 100644 --- a/src/mathed/math_fracinset.C +++ b/src/mathed/math_fracinset.C @@ -32,16 +32,16 @@ void MathFracInset::metrics(MathMetricsInfo const & mi) const xcell(0).metrics(m); xcell(1).metrics(m); width_ = std::max(xcell(0).width(), xcell(1).width()) + 4; - ascent_ = xcell(0).height() + 4 + 5; - descent_ = xcell(1).height() + 4 - 5; + ascent_ = xcell(0).height() + 2 + 5; + descent_ = xcell(1).height() + 2 - 5; } void MathFracInset::draw(Painter & pain, int x, int y) const { int m = x + width() / 2; - xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).descent() - 3 - 5); - xcell(1).draw(pain, m - xcell(1).width() / 2, y + xcell(1).ascent() + 3 - 5); + xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).descent() - 2 - 5); + xcell(1).draw(pain, m - xcell(1).width() / 2, y + xcell(1).ascent() + 2 - 5); if (!atop_) pain.line(x + 2, y - 5, x + width() - 4, y - 5, LColor::math); } diff --git a/src/mathed/math_stackrelinset.C b/src/mathed/math_stackrelinset.C index 75ccb8710a..2c2e188751 100644 --- a/src/mathed/math_stackrelinset.C +++ b/src/mathed/math_stackrelinset.C @@ -31,8 +31,9 @@ void MathStackrelInset::metrics(MathMetricsInfo const & mi) const void MathStackrelInset::draw(Painter & pain, int x, int y) const { - int m = x + width() / 2; - xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).height() - 4); + int m = x + width() / 2; + int yo = y - xcell(1).ascent() - xcell(0).descent() - 1; + xcell(0).draw(pain, m - xcell(0).width() / 2, yo); xcell(1).draw(pain, m - xcell(1).width() / 2, y); } -- 2.39.2