[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kicker/taskbar
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2005-04-22 19:13:06
Message-ID: 20050422191306.5AF15651 () office ! kde ! org
[Download RAW message or body]
CVS commit by aseigo:
don't call taskbarsettings methods so often in drawButton code.
return some blinking sanity for items demanding attention, though i
personally think it looks pretty cruddy still. =(
M +21 -18 taskcontainer.cpp 1.134
--- kdebase/kicker/taskbar/taskcontainer.cpp #1.133:1.134
@@ -425,15 +425,16 @@ void TaskContainer::drawButton(QPainter
QPixmap pixmap; // icon
Task::Ptr task = 0;
- bool iconified = true;
+ bool iconified = !TaskBarSettings::showOnlyIconified();
+ bool halo = TaskBarSettings::haloText();
QFont font(KGlobalSettings::taskbarFont());
// draw sunken if we contain the active task
bool active = false;
- bool demands_attention = false;
+ bool demandsAttention = false;
TaskList::iterator itEnd = m_filteredTasks.end();
for (TaskList::iterator it = m_filteredTasks.begin(); it != itEnd; ++it)
{
task = *it;
- if (!task->isIconified())
+ if (iconified && !task->isIconified())
{
iconified = false;
@@ -447,5 +448,6 @@ void TaskContainer::drawButton(QPainter
if (task->demandsAttention())
{
- demands_attention = true;
+ demandsAttention = attentionState == ATTENTION_BLINK_TIMEOUT ||
+ attentionState % 2 == 0;
}
}
@@ -454,7 +456,5 @@ void TaskContainer::drawButton(QPainter
QColorGroup colors = palette().active();
- if (demands_attention &&
- (attentionState == ATTENTION_BLINK_TIMEOUT ||
- attentionState % 2 == 0))
+ if (demandsAttention)
{
// blink until blink timeout, then display differently without blinking
@@ -463,4 +463,13 @@ void TaskContainer::drawButton(QPainter
colors.setColor( QColorGroup::ButtonText, colors.highlightedText() );
colors.setColor( QColorGroup::Text, colors.highlightedText() );
+
+ if (!TaskBarSettings::drawButtons())
+ {
+// QImage image = pm->convertToImage();
+// KIconEffect::colorize(image, colors.button(), 1);
+// p->drawImage(QPoint(0, 0), image, rect());
+ p->fillRect(rect(), colors.button());
+ halo = true;
+ }
}
@@ -475,8 +484,4 @@ void TaskContainer::drawButton(QPainter
pixmap = task->pixmap();
}
- else // we must be a startup (and therefor can't be minimized)
- {
- iconified = false;
- }
bool sunken = isDown() || active || aboutToActivate;
@@ -518,7 +523,5 @@ void TaskContainer::drawButton(QPainter
// fade out the icon when minimized
- // only do this if we are not showing only iconified windows
- // it looks pretty stupid when they are *all* faded :-)
- if (!TaskBarSettings::showOnlyIconified() && iconified)
+ if (iconified)
{
KIconEffect::semiTransparent( pixmap );
@@ -553,5 +556,5 @@ void TaskContainer::drawButton(QPainter
this);
- if (!TaskBarSettings::showOnlyIconified() && iconified)
+ if (iconified)
{
KIconEffect::semiTransparent(modPixmap);
@@ -574,5 +577,5 @@ void TaskContainer::drawButton(QPainter
// get the color for the text label
- if (!TaskBarSettings::showOnlyIconified() && iconified)
+ if (iconified)
{
textPen = QPen(KickerLib::blendColors(colors.button(), colors.buttonText()));
@@ -635,5 +638,5 @@ void TaskContainer::drawButton(QPainter
tp.setPen(textPen);
- if (TaskBarSettings::haloText() && taskBar)
+ if (halo)
{
taskBar->drawShadowText(tp, tr, textFlags, text);
@@ -655,5 +658,5 @@ void TaskContainer::drawButton(QPainter
p->setPen(textPen);
- if (TaskBarSettings::haloText() && taskBar)
+ if (halo)
{
taskBar->drawShadowText(*p, tr, textFlags, text);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic