From kde-commits Fri Jun 27 01:13:39 2008 From: =?utf-8?q?Sebastian=20K=C3=BCgler?= Date: Fri, 27 Jun 2008 01:13:39 +0000 To: kde-commits Subject: playground/base/plasma/applets/train-clock Message-Id: <1214529219.160720.26961.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=121452922721976 SVN commit 824978 by sebas: Don't forget to resize the applet. Now we can have giant trainclocks all over the desktop again. M +6 -3 clock.cpp --- trunk/playground/base/plasma/applets/train-clock/clock.cpp #824977:824978 @@ -127,6 +127,9 @@ kDebug() << "Other FormFactor"; } } + if (constraints & Plasma::SizeConstraint) { + updateSizes(); + } } void Clock::dataUpdated(const QString& source, const Plasma::DataEngine::Data &data) @@ -185,7 +188,7 @@ parent->addPage(widget, parent->windowTitle(), "chronometer"); connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted())); connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted())); - + ui.showDate->setChecked(m_showDate); ui.showYear->setChecked(m_showYear); ui.showDay->setChecked(m_showDay); @@ -349,7 +352,7 @@ void Clock::paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option, const QRect &contentsRect) { - // TODO implement flipping seconds, disabled by default, and disable anyway when + // TODO implement flipping seconds, disabled by default, and disable anyway when // Plasma::Applet::shouldConserveResources() is true Q_UNUSED(option); if (m_time.isValid() && m_date.isValid()) { @@ -359,7 +362,7 @@ // *** First, set some properties! p->setFont (KGlobalSettings::smallestReadableFont()); - p->setPen(QPen(m_fgColor)); + p->setPen(QPen(m_fgColor)); p->setRenderHint(QPainter::SmoothPixmapTransform); p->setRenderHint(QPainter::Antialiasing); p->setRenderHint(QPainter::TextAntialiasing);