Abdelrazak Younes <[EMAIL PROTECTED]> writes:

| Jose, Lars, objection?

Not that two featrues are ins this one:
        - reverse video
        - dashedUnderline

(Q: shouldn't these be usevisible?)

| Index: frontends/qt4/QLPainter.C
| ===================================================================
| --- frontends/qt4/QLPainter.C (revision 17409)
| +++ frontends/qt4/QLPainter.C (working copy)
| @@ -52,19 +52,29 @@
|  
|  
|  void QLPainter::setQPainterPen(LColor_color col,
| -     Painter::line_style ls, Painter::line_width lw)
| +     Painter::line_style ls, Painter::line_width lw, bool reverseVideo)
|  {
| -     if (col == current_color_ && ls == current_ls_ && lw == current_lw_)
| +     static bool last_reverseVideo = false;
| +     if (col == current_color_ && ls == current_ls_ && lw == current_lw_
| +             && last_reverseVideo == reverseVideo)
|               return;
|  
|       current_color_ = col;
|       current_ls_ = ls;
|       current_lw_ = lw;
| +     last_reverseVideo = reverseVideo;
|  
|       QPen pen = QPainter::pen();
|  
| -     pen.setColor(guiApp->colorCache().get(col));
| +     QColor qcol(guiApp->colorCache().get(col));
| +     if(reverseVideo) {
| +             qcol.setRed(255 - qcol.red());
| +             qcol.setGreen(255 - qcol.green());
| +             qcol.setBlue(255 - qcol.blue());
| +     }
| +     pen.setColor(qcol);
|  
| +
|       switch (ls) {
|               case line_solid: pen.setStyle(Qt::SolidLine); break;
|               case line_onoffdash: pen.setStyle(Qt::DotLine); break;

Hmm... but Qt::DotLine is wrong... it should have been Qt::DashLine
shouldn't it? (How come DotLine was choosen for line_ofoffdash?)


| Index: lyxfont.C
| ===================================================================
| --- lyxfont.C (revision 17409)
| +++ lyxfont.C (working copy)
| @@ -278,6 +278,18 @@
|  }
|  

Some of the font changes feel/look wrong... 

First of all dashedUnderbar is just a special case of underbar and
they are not even possible at the same time (or shouldn't be). I think
that both underbar and dashedUnderbar needs to change type. F.ex. to
an "enum UnderBarType".

enum UnderBarType {
        no_bar,
        line_bar,
        dash_bar
};

or something.

ReverseVideo is a binary thing so that feels a lot better.

-- 
        Lgb

Reply via email to