make alpha blended panels work

unfortunately all windows must have alpha channel
This commit is contained in:
Marco Martin 2013-02-15 12:30:32 +01:00
parent 102986ac28
commit 44699e7e0d
3 changed files with 8 additions and 3 deletions

View File

@ -186,6 +186,7 @@ void DesktopCorona::checkViews()
} else if (m_views.count() < m_desktopWidget->screenCount()) {
for (int i = m_views.count(); i < m_desktopWidget->screenCount(); ++i) {
View *view = new View(this);
QSurfaceFormat format;
view->init();
view->show();

View File

@ -25,12 +25,11 @@
PanelView::PanelView(Plasma::Corona *corona, QWindow *parent)
: View(corona, parent)
{
//FIXME: this works only if done in View
/*QSurfaceFormat format;
QSurfaceFormat format;
format.setAlphaBufferSize(8);
setFormat(format);
setClearBeforeRendering(true);
setColor(QColor(Qt::transparent));*/
setColor(QColor(Qt::transparent));
setFlags(Qt::FramelessWindowHint);
}

View File

@ -28,6 +28,11 @@ View::View(Plasma::Corona *corona, QWindow *parent)
: QQuickView(parent),
m_corona(corona)
{
//FIXME: for some reason all windows must have alpha enable otherwise the ones that do won't paint.
//Probably is an architectural problem
QSurfaceFormat format;
format.setAlphaBufferSize(8);
setFormat(format);
}
View::~View()