traverso-commit
[Top][All Lists]
Advanced

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

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


From: Nicola Doebelin
Subject: [Traverso-commit] traverso/src/core Themer.cpp
Date: Mon, 07 May 2007 18:28:55 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Nicola Doebelin <n_doebelin>    07/05/07 18:28:55

Modified files:
        src/core       : Themer.cpp 

Log message:
        New font theming

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Themer.cpp?cvsroot=traverso&r1=1.2&r2=1.3

Patches:
Index: Themer.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Themer.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Themer.cpp  25 Apr 2007 12:43:32 -0000      1.2
+++ Themer.cpp  7 May 2007 18:28:55 -0000       1.3
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: Themer.cpp,v 1.2 2007/04/25 12:43:32 r_sijrier Exp $
+$Id: Themer.cpp,v 1.3 2007/05/07 18:28:55 n_doebelin Exp $
 */
 
 #include "Themer.h"
@@ -184,14 +184,15 @@
        QDomNode fontsNode = docElem.firstChildElement("fonts");
        QDomNode fontNode = fontsNode.firstChild();
        
+       QFont basefont = QApplication::font();
+
        while (!fontNode.isNull()) {
                
                QDomElement e = fontNode.toElement();
                
-               QString family = e.attribute("family", "");
-               int size = e.attribute("size", "").toInt();
                QString name = e.attribute("name", "");
-               QFont font(family, size);
+               QFont font(basefont);
+               font.setPointSizeF(e.attribute("value", "1.0").toFloat() * 
(float)basefont.pointSizeF());
                
                m_fonts.insert(name, font);
                fontNode = fontNode.nextSibling();




reply via email to

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