[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: 2008-10-14 1:54:49
Message-ID: 1223949289.168984.3137.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 871163 by aseigo:
set a minimum size even when not on a panel
M +5 -0 clock.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.cpp #871162:871163
@@ -112,6 +112,7 @@
if (m_showSeconds) {
aspect = 3;
}
+
if (formFactor() == Plasma::Horizontal) {
// We have a fixed height, set some sensible width
if (m_showDate || m_showTimezone) {
@@ -125,6 +126,10 @@
// We have a fixed width, set some sensible height
setMinimumHeight((int)contentsRect().width() / aspect);
setMinimumWidth(0);
+ } else {
+ QFontMetricsF metrics(KGlobalSettings::smallestReadableFont());
+ QString timeString = KGlobal::locale()->formatTime(QTime(23, 59), m_showSeconds);
+ setMinimumSize(metrics.size(Qt::TextSingleLine, timeString));
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic