]> git.lyx.org Git - features.git/commitdiff
draw decorations closer to the place where LaTeX puts them
authorAndré Pönitz <poenitz@gmx.net>
Fri, 1 Feb 2002 15:53:34 +0000 (15:53 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 1 Feb 2002 15:53:34 +0000 (15:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3473 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_decorationinset.C
src/mathed/math_support.C
src/mathed/math_xdata.C

index bbfdf2005f4730ba5360129a11f1bbd6c71e7191..26193af9c5dcadbaf1ee6d63b4f9042341100672 100644 (file)
@@ -73,7 +73,7 @@ void MathDecorationInset::metrics(MathMetricsInfo const & st) const
        ascent_  = xcell(0).ascent();
        descent_ = xcell(0).descent();
 
-       dh_ = 5; //mathed_char_height(LM_TC_VAR, size(), 'I', ascent_, descent_);  
+       dh_ = 6; //mathed_char_height(LM_TC_VAR, size(), 'I', ascent_, descent_);  
 
        if (upper()) {
                dy_ = -ascent_ - dh_;
@@ -91,7 +91,7 @@ void MathDecorationInset::draw(Painter & pain, int x, int y) const
        if (wide()) 
                mathed_draw_deco(pain, x, y + dy_, width_, dh_, name_);
        else {
-               int w = 2 + mathed_char_width(LM_TC_VAR, size_, 'x'); 
+               int w = mathed_char_width(LM_TC_VAR, size_, 'x'); 
                mathed_draw_deco(pain, x + (width_ - w) / 2, y + dy_, w, dh_, name_);
        }
 }
index 8f437afb68b675feadba428505a84646f8f84ddd..e562200ac6c096fcde0ea81673aa0f1430a6356a 100644 (file)
@@ -393,8 +393,8 @@ double const hline[] = {
 
 
 double const hline2[] = {
-       1, 0.1, 0.5,  0.3, 0.5,
-       1, 0.7, 0.5,  0.9, 0.5,
+       1, 0.2, 0.5,  0.3, 0.5,
+       1, 0.7, 0.5,  0.8, 0.5,
        0
 };
 
index 998c3e013052aa97ae2dad5aab42e862680d0860..9c2d059f13059a2d373aada738c1538ad813e5fc 100644 (file)
@@ -21,16 +21,16 @@ MathXArray::MathXArray()
 void MathXArray::metrics(MathMetricsInfo const & mi) const
 {
        size_ = mi;
-       mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_);
 
-       if (data_.empty()) 
+       if (data_.empty()) {
+               mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_);
                return;
+       }
 
-       math_font_max_dim(LM_TC_TEXTRM, mi, ascent_, descent_); 
-       width_ = 0;
+       ascent_  = 0;
+       descent_ = 0;
+       width_   = 0;
 
-       //lyxerr << "MathXArray::metrics(): '" << data_ << "'\n";
-       
        for (const_iterator it = begin(); it != end(); ++it) {
                MathInset const * p = it->nucleus();
                MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it);