[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/digital-clock
From: Alexis Ménard <menard () kde ! org>
Date: 2009-05-22 8:30:20
Message-ID: 1242981020.319618.7307.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 971260 by menard:
When this applet displays seconds, it is useless to activate the cache
the code path to paint in a pixmap, store in the cache is way too
costly for every second full updates comparing to draw directly.
M +10 -0 clock.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.cpp #971259:971260
@@ -84,6 +84,11 @@
m_showDay = cg.readEntry("showDay", true);
m_showSeconds = cg.readEntry("showSeconds", false);
+ //We don't need to cache the applet if it update every seconds
+ if (m_showSeconds)
+ setCacheMode(QGraphicsItem::NoCache);
+ else
+ setCacheMode(QGraphicsItem::DeviceCoordinateCache);
m_plainClockFont = cg.readEntry("plainClockFont", m_plainClockFont);
m_useCustomColor = cg.readEntry("useCustomColor", false);
if (m_useCustomColor) {
@@ -224,6 +229,11 @@
//that the update interval is set properly.
if (m_showSeconds != ui.secondsCheckbox->isChecked()) {
m_showSeconds = !m_showSeconds;
+ //We don't need to cache the applet if it update every seconds
+ if (m_showSeconds)
+ setCacheMode(QGraphicsItem::NoCache);
+ else
+ setCacheMode(QGraphicsItem::DeviceCoordinateCache);
cg.writeEntry("showSeconds", m_showSeconds);
dataEngine("time")->disconnectSource(currentTimezone(), this);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic