[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/digital-clock
From: Sebastian Kügler <sebas () kde ! org>
Date: 2009-06-07 13:07:11
Message-ID: 1244380031.122937.17594.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 978530 by sebas:
Improve sizing of date font
BUG:183978
M +7 -2 clock.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.cpp #978529:978530
@@ -330,7 +330,7 @@
p->setRenderHint(QPainter::SmoothPixmapTransform);
p->setRenderHint(QPainter::Antialiasing);
- /* ... helps debugging contentsRect and sizing ...
+ /* ... helps debugging contentsRect and sizing ...
QColor c = QColor(Qt::blue);
c.setAlphaF(.5);
p->setBrush(c);
@@ -405,7 +405,12 @@
smallFont.setPixelSize(qMax(dateRect.height() / 2, fm.ascent()));
m_dateRect = preparePainter(p, dateRect, smallFont, dateString);
} else {
- smallFont.setPixelSize(qMax(contentsRect.height()/10, fm.ascent()));
+ // Find a suitable size for the date font
+ if (formFactor() == Plasma::Vertical) {
+ smallFont.setPixelSize(qMax(contentsRect.height()/6, fm.ascent()));
+ } else {
+ smallFont.setPixelSize(qMax(contentsRect.height()*2/7, fm.ascent()));
+ }
m_dateRect = preparePainter(p, contentsRect, smallFont, dateString);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic