Summary: | kicker pseudo transparency redrawing is broken | ||
---|---|---|---|
Product: | [Unmaintained] kicker | Reporter: | Thomas Reitelbach <tr> |
Component: | general | Assignee: | Aaron J. Seigo <aseigo> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | nickthompson |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
kicker with half-drawn buttons
Buttons, now with half black background Kicker which is almost completely non-transparent My kickerrc |
Description
Thomas Reitelbach
2005-09-22 19:49:51 UTC
Created attachment 12665 [details]
kicker with half-drawn buttons
This is kicker with half-drawn buttons for the k-menu and konqueror profiles.
SVN commit 463429 by aseigo: paint button backgrounds properly BUGS:113093,113160 M +50 -2 kicker/core/container_button.cpp M +6 -2 libkicker/panelbutton.cpp --- branches/KDE/3.5/kdebase/kicker/kicker/core/container_button.cpp #463428:463429 @@ -36,6 +36,7 @@ #include "global.h" #include "appletop_mnu.h" +#include "containerarea.h" #include "panelbutton.h" #include "bookmarksbutton.h" #include "browserbutton.h" @@ -43,6 +44,7 @@ #include "extensionbutton.h" #include "kbutton.h" #include "kicker.h" +#include "kickerSettings.h" #include "kickertip.h" #include "nonkdeappbutton.h" #include "paneldrag.h" @@ -94,13 +96,59 @@ return width; } +#include <iostream> +using namespace std; void ButtonContainer::setBackground() { PanelButton* b = button(); - if (b) + if (!b) { - b->repaint(); + return; } + +cout << "ButtonContainer::setBackground()" << endl; + b->unsetPalette(); + + if (!KickerSettings::transparent()) + { + b->update(); + return; + } + + // inheritance is ButtonContainer - ScrollView - ContainerArea + ContainerArea* area = 0; + QObject* ancestor = parent(); + while (ancestor && !area) + { + area = dynamic_cast<ContainerArea*>(ancestor); + ancestor = ancestor->parent(); + } + + const QPixmap* containerBG = area ? area->completeBackgroundPixmap() + : 0; + + if (!containerBG || containerBG->isNull()) + { +cout << "\tsetting no background!" << endl; + b->setPaletteBackgroundPixmap(QPixmap()); + } + else + { + int srcx = x(); + int srcy = y(); + int buttonWidth = b->width(); + int buttonHeight = b->height(); + + QPixmap buttonBackground(buttonWidth, buttonHeight); + copyBlt(&buttonBackground, 0, 0, + containerBG, srcx, srcy, + buttonWidth, buttonHeight); + + b->setPaletteBackgroundPixmap(buttonBackground); + cout << "\tbackground set!" << endl; + } + + b->update(); } void ButtonContainer::configure() --- branches/KDE/3.5/kdebase/kicker/libkicker/panelbutton.cpp #463428:463429 @@ -502,13 +502,17 @@ void PanelButton::drawButton(QPainter *p) { - // Draw the background. This is always needed, even when using tiles, - // because they don't have to cover the entire button. if (m_tileColor.isValid()) { p->fillRect(rect(), m_tileColor); style().drawPrimitive(QStyle::PE_Panel, p, rect(), colorGroup()); } + else if (paletteBackgroundPixmap()) + { + // Draw the background. This is always needed, even when using tiles, + // because they don't have to cover the entire button. + p->drawPixmap(0, 0, *paletteBackgroundPixmap()); + } const QPixmap& tile = (isDown() || isOn()) ? m_down : m_up; if (!tile.isNull()) Thanks for you effort, Aaron, but unfortunately this bug is not fixed :( I'll attach two new screenshots which i made after your "fix". Created attachment 12691 [details]
Buttons, now with half black background
This time the buttons background appears half black, half transparent.
Created attachment 12692 [details]
Kicker which is almost completely non-transparent
Here most of kicker is non-transparent. The blue parts in the screenshot are my
real desktop background. all blue (transparent) parts in this screenshot are
parts, not occupied by an applet. maybe this information is useful? so it seems
that "free" space in kicker is not affected by this bug.
well, thomas, i don't know what to say. i can not reproduce this problem, and it's hard to debug something i can't reproduce. buttons should be painting the correct background. but as you note it seems to be affecting applets as well which are a completely different matter. can you attach your kickerrc to this bug report please? thanks. Created attachment 12701 [details]
My kickerrc
This is the kickerrc. But be aware: I also see this bug with a different user
with a fresh ~/.kde, so i doubt that it's a problem in the configuration file
:(
*** Bug 113160 has been marked as a duplicate of this bug. *** |