aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-12-19 10:37:52 -0500
committerKen Moore <ken@pcbsd.org>2014-12-19 10:37:52 -0500
commit6e0f72ab9e0535309942711d98a611a1e1025305 (patch)
tree45c41ef9d6bdc7f6c776347221b6c9f019f38cc6 /lumina-desktop
parentMerge branch 'master' of github.com:pcbsd/lumina (diff)
downloadlumina-6e0f72ab9e0535309942711d98a611a1e1025305.tar.gz
lumina-6e0f72ab9e0535309942711d98a611a1e1025305.tar.bz2
lumina-6e0f72ab9e0535309942711d98a611a1e1025305.zip
Fix up the sticky status-setting routine for the Lumina Panel. Now the WM will be aware of the new status change (send an event instead of changing the property directly).
Also add a quick fix for system tray icons: if the icon size does not match the tray size, send a resize event and redraw a few moments later.
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/LPanel.cpp5
-rw-r--r--lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp1
2 files changed, 4 insertions, 2 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index afef1e13..b94534b8 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -38,7 +38,7 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
this->setAttribute(Qt::WA_AlwaysShowToolTips);
this->setObjectName("LuminaPanelWidget");
panelArea->setObjectName("LuminaPanelPluginWidget");
- LX11::SetAsPanel(this->winId()); //set proper type of window for a panel since Qt can't do it
+ //LX11::SetAsPanel(this->winId()); //set proper type of window for a panel since Qt can't do it
LSession::handle()->XCB->SetAsSticky(this->winId());
//LX11::SetAsSticky(this->winId());
layout = new QBoxLayout(QBoxLayout::LeftToRight);
@@ -131,7 +131,8 @@ void LPanel::UpdatePanel(){
}
//With QT5, we need to make sure to reset window properties on occasion
LSession::handle()->XCB->SetAsSticky(this->winId());
- LX11::SetAsPanel(this->winId());
+ //LX11::SetAsPanel(this->winId());
+ //LX11::SetAsSticky(this->winId());
//Now update the appearance of the toolbar
QString color = settings->value(PPREFIX+"color", "rgba(255,255,255,160)").toString();
QString style = "QWidget#LuminaPanelPluginWidget{ background: %1; border-radius: 3px; border: 1px solid %1; }";
diff --git a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
index 716a49ed..7e0a30f6 100644
--- a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
+++ b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
@@ -124,6 +124,7 @@ void TrayIcon::paintEvent(QPaintEvent *event){
//qDebug() << " - Pix size:" << pix.size().width() << pix.size().height();
//qDebug() << " - Geom:" << this->geometry().x() << this->geometry().y() << this->geometry().width() << this->geometry().height();
if(!pix.isNull()){
+ if(this->size() != pix.size()){ QTimer::singleShot(10, this, SLOT(updateIcon())); qDebug() << "-- Icon size mismatch"; }
painter.drawPixmap(0,0,this->width(), this->height(), pix.scaled(this->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation) );
}
//qDebug() << " - Done";
bgstack15