Bug#47254: Bug#47254: atlantik-devel] Bug#47254: small image text in both themes
Rob Kaper <[email protected]>
| Newsgroups | gmane.comp.kde.devel.atlantik |
|---|---|
| Message-ID | <[email protected]> |
On Saturday 31 August 2002 17:43, Rick Fournier wrote: > On August 31, 2002 11:25 am, Rob Kaper wrote: > > On Saturday 31 August 2002 09:18, [email protected] wrote: > > > small image text in both themes make it imposible to read the estates > > > name, cost and owner when they display in the middle of the board > > > > What version of Qt? More people have complained about this but I cannot > > reproduce it myself. :-/ > > Rob > > im running qt-3.0.5 2 wich was install via freebsd ports Can you try the attached patch? Rob -- Rob Kaper | Gimme some love, gimme some skin, [email protected] | if we ain't got that then we ain't got much www.capsi.com | and we ain't got nothing, nothing! -- "Nothing" by A
estatedetailsfontsize.diff
(text/x-diff, 2.8 KB)
Index: libatlantikui/estatedetails.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/estatedetails.cpp,v
retrieving revision 1.11
diff -u -3 -d -p -r1.11 estatedetails.cpp
--- libatlantikui/estatedetails.cpp 2002/08/15 10:56:25 1.11
+++ libatlantikui/estatedetails.cpp 2002/09/11 03:59:47
@@ -151,7 +151,11 @@ void EstateDetails::paintEvent(QPaintEve
// Estate name
painter.setPen(Qt::white);
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize() * 2, QFont::Bold));
+ int fontSize = KGlobalSettings::generalFont().pointSize();
+ if (fontSize == -1)
+ fontSize = KGlobalSettings::generalFont().pixelSize();
+
+ painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize * 2, QFont::Bold));
painter.drawText(KDialog::marginHint(), KDialog::marginHint(), width()-KDialog::marginHint(), titleHeight, Qt::AlignJustify, m_estate->name());
painter.setPen(Qt::black);
@@ -160,34 +164,34 @@ void EstateDetails::paintEvent(QPaintEve
// Estate group
if (m_estate->estateGroup())
{
- xText = titleHeight - KGlobalSettings::generalFont().pointSize() - KDialog::marginHint();
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Bold));
+ xText = titleHeight - fontSize - KDialog::marginHint();
+ painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize, QFont::Bold));
painter.drawText(5, xText, width()-10, titleHeight, Qt::AlignRight, m_estate->estateGroup()->name().upper());
}
- xText = titleHeight + KGlobalSettings::generalFont().pointSize() + 5;
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal));
+ xText = titleHeight + fontSize + 5;
+ painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize, QFont::Normal));
// Price
if (m_estate->price())
{
painter.drawText(5, xText, i18n("Price: %1").arg(m_estate->price()));
- xText += (KGlobalSettings::generalFont().pointSize() + 5);
+ xText += (fontSize + 5);
}
// Owner, houses, isMortgaged
if (m_estate->canBeOwned())
{
painter.drawText(5, xText, i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned")));
- xText += (KGlobalSettings::generalFont().pointSize() + 5);
+ xText += (fontSize + 5);
if (m_estate->isOwned())
{
painter.drawText(5, xText, i18n("Houses: %1").arg(m_estate->houses()));
- xText += (KGlobalSettings::generalFont().pointSize() + 5);
+ xText += (fontSize + 5);
painter.drawText(5, xText, i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No")));
- xText += (KGlobalSettings::generalFont().pointSize() + 5);
+ xText += (fontSize + 5);
}
}