[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/digital-clock
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2009-01-15 8:14:28
Message-ID: 1232007268.693077.22939.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 911269 by aseigo:
QFont returns -1 for pixelSize when set with a point size. so set with a pixel size, \
and now it works again. CCBUG:158762
M +5 -4 clock.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.cpp #911268:911269
@@ -378,7 +378,8 @@
// Check sizes
// magic 10 is for very big spaces,
// where there's enough space to grow without harming time space
- smallFont.setPointSizeF(qMax(contentsRect.height()/10, \
smallFont.pointSize())); + QFontMetrics fm(smallFont);
+ smallFont.setPixelSize(qMax(contentsRect.height()/10, fm.ascent()));
// kDebug(96669) << "=========";
// kDebug(96669) << "contentsRect: " << contentsRect;
@@ -391,7 +392,7 @@
// kDebug(96669) << "subtitleHeight: " << subtitleHeight;
if (m_dateTimezoneBesides) {
- //kDebug(96669) << contentsRect.height() << subtitleHeight << \
metrics.height(); + //kDebug(96669) << contentsRect.height() << \
subtitleHeight << smallFont.pixelSize();
if (contentsRect.height() - subtitleHeight >= smallFont.pixelSize() || \
formFactor() != Plasma::Horizontal) {
// to small to display the time on top of the date/timezone
// put them side by side
@@ -403,8 +404,8 @@
}
} else {
/* kDebug(96669) << "checking timezone placement"
- << contentsRect.height() << dateRect.height() << \
subtitleHeight <<
- metrics.lineSpacing();*/
+ << contentsRect.height() << dateRect.height() << \
subtitleHeight + << smallFont.pixelSize() << \
smallFont.pointSize();*/
if (contentsRect.height() - subtitleHeight < smallFont.pixelSize() && \
formFactor() == Plasma::Horizontal) {
// to small to display the time on top of the date/timezone
// put them side by side
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic