Michael Schmitt wrote:
> Anyway, the problem seems to be related to font_metrics::ascent:
> 
>     case MENU_SEPARATOR:
>     {
>         // A triangle the width and height of an 'x'
>         int w = font_metrics::width('x', font);
>         int ox = font_metrics::width(' ', font) + int(x);
>         int h = font_metrics::ascent('x', font);
>         int xp[4], yp[4];
> 
>         xp[0] = ox; yp[0] = baseline;
>         xp[1] = ox; yp[1] = baseline - h;
>         xp[2] = ox + w; yp[2] = baseline - h/2;
>         xp[3] = ox; yp[3] = baseline;
> 
>         pain.lines(xp, yp, 4, LColor::special);
>         x += width(bv, font);
>         break;
>     }
> 
> On Qt/FreeWin32, variable 'h' is set to -14, i.e. to a negative value,
> though it should be positive (ascent should alway be positive, right?)

For information. Adding
    lyxerr << "MENU_SEPARATOR w: " << w << " ox: " 
           << ox << " h " << h << std::endl;
I get
MENU_SEPARATOR w: 10 ox: 144 h 11

This is with Qt 3.3 and Fedora Core 3 (linux).

-- 
Angus

Reply via email to