[prev in list] [next in list] [prev in thread] [next in thread]
List: atlantik-devel
Subject: [atlantik-cvs] CVS: kdegames/atlantik/libatlantikui estateview.cpp,
From: kde () office ! kde ! org
Date: 2004-05-29 11:05:40
Message-ID: 40B86E84.mailP7012NBBL () office ! kde ! org
[Download RAW message or body]
Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv32632/libatlantikui
Modified Files:
estateview.cpp
Log Message:
backport 3.1 compat: rPixelSqueeze is since 3.2
Index: estateview.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/estateview.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- estateview.cpp 10 Feb 2004 19:46:36 -0000 1.76
+++ estateview.cpp 29 May 2004 11:05:37 -0000 1.77
@@ -21,6 +21,7 @@
#include <qcursor.h>
#include <kdebug.h>
+#include <kdeversion.h>
#include <kdialogbase.h>
#include <kglobalsettings.h>
#include <klocale.h>
@@ -390,16 +391,21 @@
delete quartzBuffer;
}
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), \
KGlobalSettings::generalFont().pointSize(), QFont::Bold));
-// painter.drawText(0, height()/2-15, m_estate->name().section(" ", 0, 0));
+ QFont font = QFont( KGlobalSettings::generalFont().family(), \
KGlobalSettings::generalFont().pointSize(), QFont::Normal ); \
+ painter.setFont(font); + QString estateName = m_estate->name();
+#if defined(KDE_MAKE_VERSION)
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
+ if ( m_estate->color().isValid() && ( m_orientation == West || \
m_orientation == East ) ) + estateName = KStringHandler::rPixelSqueeze( \
m_estate->name(), QFontMetrics( font ), 3*width()/4 ); + else
+ estateName = KStringHandler::rPixelSqueeze( m_estate->name(), QFontMetrics( font \
), width() ); +#endif
+#endif
if (m_estate->color().isValid() && m_orientation == West)
- painter.drawText( width()/4 + 2, height()/2, KStringHandler::rPixelSqueeze( \
m_estate->name(), QFontMetrics( QFont( KGlobalSettings::generalFont().family(), \
KGlobalSettings::generalFont().pointSize(), QFont::Bold ) ), \
3*width()/4 ) );
- else if (m_estate->color().isValid() && m_orientation == East)
- painter.drawText(2, height()/2, KStringHandler::rPixelSqueeze( m_estate->name(), \
QFontMetrics( QFont( KGlobalSettings::generalFont().family(), \
KGlobalSettings::generalFont().pointSize(), QFont::Bold ) ), 3*width()/4 ) ); + \
painter.drawText( width()/4 + 2, height()/2, estateName ); else
- painter.drawText(2, height()/2, KStringHandler::rPixelSqueeze( m_estate->name(), \
QFontMetrics( QFont( KGlobalSettings::generalFont().family(), \
KGlobalSettings::generalFont().pointSize(), QFont::Bold ) ), width() \
) );
-
-// painter.drawText(0, height()/2+15, m_estate->name().section(" ", 2, 2));
+ painter.drawText(2, height()/2, estateName );
b_recreate = false;
}
_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@kde.org
https://mail.kde.org/mailman/listinfo/atlantik-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic