]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/qfontexample.C
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / qfontexample.C
index c7a9c7081d3e43f26f9c256714226e34f33ad552..6b5c7f7433aff6c76d70c044d8eb6469c8bab91e 100644 (file)
@@ -8,11 +8,11 @@
  * Full author contact details are available in file CREDITS
  */
 
+
 #include "qfontexample.h"
+
 #include <qpainter.h>
+
 void QFontExample::set(QFont const & font, QString const & text)
 {
        font_ = font;
@@ -20,22 +20,22 @@ void QFontExample::set(QFont const & font, QString const & text)
        repaint();
 }
 
+
 QSize QFontExample::sizeHint() const
 {
-       QFontMetrics m(font_); 
+       QFontMetrics m(font_);
        return QSize(m.width(text_) + 10, m.ascent() + m.descent() + 6);
 }
+
+
 void QFontExample::paintEvent(QPaintEvent *)
 {
-       QPainter p; 
+       QPainter p;
        QFontMetrics m(font_);
+
        p.begin(this);
        p.setFont(font_);
-       p.drawRect(0, 0, width() - 1, height() - 1); 
+       p.drawRect(0, 0, width() - 1, height() - 1);
        p.drawText(5, 3 + m.ascent(), text_);
        p.end();
 }