Fix pixel noise in X11 systray icons that are not 22x22
If a system tray icon is set to a non default size by an X11 system tray, the area beyond 22x22 will not be painted, since the first paint is performed before the first resize, and the first resize does not trigger expose either. The bug can be seen in KDE if the system tray is not 22 pixel height. This patch triggers updates on resize to ensure we always repaint fully on resize. Change-Id: Ia81d2329a2c9faff220f07163ac38cafbd520ffc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
813462a0ce
commit
2021c6c8f7
@ -83,6 +83,7 @@ protected:
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *ev);
|
||||
virtual bool event(QEvent *);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
|
||||
private slots:
|
||||
void systemTrayWindowChanged(QScreen *screen);
|
||||
@ -205,6 +206,11 @@ void QSystemTrayIconSys::paintEvent(QPaintEvent *)
|
||||
q->icon().paint(&painter, rect);
|
||||
}
|
||||
|
||||
void QSystemTrayIconSys::resizeEvent(QResizeEvent *)
|
||||
{
|
||||
update();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
QSystemTrayIconPrivate::QSystemTrayIconPrivate()
|
||||
|
Loading…
x
Reference in New Issue
Block a user