summaryrefslogtreecommitdiffstats
path: root/kicker/taskbar/taskcontainer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-15 19:15:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-15 19:15:16 +0000
commitcc0ad49c75d6cf6b4e63eb8c6012afe55c1589f9 (patch)
tree2a29ccab4d3cea34b87bfcbc38e64a8e25d25bb0 /kicker/taskbar/taskcontainer.cpp
parent107dd1f98367d07df7cbe2042786511e44706d3a (diff)
downloadtdebase-cc0ad49c75d6cf6b4e63eb8c6012afe55c1589f9.tar.gz
tdebase-cc0ad49c75d6cf6b4e63eb8c6012afe55c1589f9.zip
Allow kdebase to (mostly) function correctly with TQt for Qt4
Fix kicker tackbar handling under Classic mode (thanks to Ilya Chernykh for the patch) Fix a newly invalidated section of code under GCC 4.5.2 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47723#c6) git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1220927 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker/taskbar/taskcontainer.cpp')
-rw-r--r--kicker/taskbar/taskcontainer.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/kicker/taskbar/taskcontainer.cpp b/kicker/taskbar/taskcontainer.cpp
index 345fcb1f9..749c33c03 100644
--- a/kicker/taskbar/taskcontainer.cpp
+++ b/kicker/taskbar/taskcontainer.cpp
@@ -233,9 +233,9 @@ void TaskContainer::setLastActivated()
void TaskContainer::animationTimerFired()
{
- if (!frames.isEmpty() && taskBar->showIcon() && frames.at(currentFrame) != frames.end())
+ if (!frames.isEmpty() && taskBar->showIcon() && frames.tqat(currentFrame) != frames.end())
{
- TQPixmap *pm = *frames.at(currentFrame);
+ TQPixmap *pm = *frames.tqat(currentFrame);
// draw pixmap
if ( pm && !pm->isNull() ) {
@@ -586,9 +586,9 @@ void TaskContainer::drawButton(TQPainter *p)
// draw button background
if (drawButton)
{
- tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, p,
- TQRect(0, 0, width(), height()),
- colors);
+ tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonTool, p,
+ TQRect(1, 1, width()-2, height()-2),
+ colors, sunken ? TQStyle::Style_Down : TQStyle::Style_Raised);
}
// shift button label on sunken buttons
@@ -684,11 +684,11 @@ void TaskContainer::drawButton(TQPainter *p)
}
else
{
- textPen = p->pen();
+ textPen = TQPen(colors.buttonText()); // textPen = p->pen();
}
}
- int availableWidth = width() - (br.x() * 2) - textPos;
+ int availableWidth = width() - (br.x() * 2) - textPos - 2;
if (m_filteredTasks.count() > 1)
{
availableWidth -= 8;
@@ -721,7 +721,12 @@ void TaskContainer::drawButton(TQPainter *p)
TQImage img = pm->convertToImage();
TQImage timg = tpm.convertToImage();
KImageEffect::blend(img, timg, *taskBar->blendGradient(size()), KImageEffect::Red);
+
+ // End painting before assigning the pixmap
+ QPaintDevice* opd = p->device();
+ p->end();
pm->convertFromImage(img);
+ p->tqbegin(opd ,this);
}
else
{
@@ -739,9 +744,9 @@ void TaskContainer::drawButton(TQPainter *p)
}
}
- if (!frames.isEmpty() && m_startup && frames.at(currentFrame) != frames.end())
+ if (!frames.isEmpty() && m_startup && frames.tqat(currentFrame) != frames.end())
{
- TQPixmap *anim = *frames.at(currentFrame);
+ TQPixmap *anim = *frames.tqat(currentFrame);
if (anim && !anim->isNull())
{
@@ -841,7 +846,7 @@ TQString TaskContainer::name()
}
// strip trailing crap
- while (i > 0 && !match.at(i).isLetterOrNumber())
+ while (i > 0 && !match.tqat(i).isLetterOrNumber())
{
--i;
}