traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src/core ViewPort.cpp


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src/core ViewPort.cpp
Date: Tue, 12 Feb 2008 11:48:41 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       08/02/12 11:48:41

Modified files:
        src/core       : ViewPort.cpp 

Log message:
        * center hold cursor text

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ViewPort.cpp?cvsroot=traverso&r1=1.29&r2=1.30

Patches:
Index: ViewPort.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ViewPort.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- ViewPort.cpp        9 Feb 2008 21:32:52 -0000       1.29
+++ ViewPort.cpp        12 Feb 2008 11:48:41 -0000      1.30
@@ -137,6 +137,10 @@
                        return true;
                }
        }
+       if (event->type() == QEvent::MouseButtonPress) {
+               printf("eating mouse press\n");
+               return true;
+       }
        return QGraphicsView::event(event);
 }
 
@@ -320,12 +324,12 @@
        
        if (!m_text.isEmpty()) {
                QFontMetrics 
fm(themer()->get_font("ViewPort:fontscale:infocursor"));
-               int width = fm.width(m_text) + 4;
+               int width = fm.width(m_text) + 8;
                int height = fm.height();
                QRect textArea = QRect(m_pixmap.width() + 10, m_pixmap.height() 
/ 4, width, height);
                
painter->setFont(themer()->get_font("ViewPort:fontscale:infocursor"));
                painter->fillRect(textArea, QBrush(Qt::white));
-               painter->drawText(textArea, m_text);
+               painter->drawText(textArea, Qt::AlignCenter, m_text);
        }
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]