mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
setWindowFlags for Toaster
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1281 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8cdb8e077f
commit
fe4bb1ce33
@ -26,6 +26,10 @@
|
||||
|
||||
#include <QtGui/QtGui>
|
||||
|
||||
#ifdef OS_MACOSX
|
||||
#include <MacWindows.h>
|
||||
#endif
|
||||
|
||||
static const unsigned TIME_TO_SHOW = 20;
|
||||
|
||||
QtToaster::QtToaster(QWidget * toaster, QFrame * toasterWindowFrame)
|
||||
@ -37,6 +41,15 @@ QtToaster::QtToaster(QWidget * toaster, QFrame * toasterWindowFrame)
|
||||
_toaster = toaster;
|
||||
_toaster->setParent(_toaster->parentWidget(), Qt::ToolTip | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
|
||||
|
||||
#ifdef OS_MACOSX
|
||||
// Make sure the other windows of the application are not raised when the
|
||||
// toaster appears
|
||||
WId wid = _toaster->winId();
|
||||
SetWindowGroup((WindowRef)wid, NULL);
|
||||
#else
|
||||
_toaster->setWindowFlags(_toaster->windowFlags() | Qt::ToolTip);
|
||||
#endif
|
||||
|
||||
WidgetBackgroundImage::setBackgroundImage(toasterWindowFrame, ":images/toaster/toaster-backrs4.png", WidgetBackgroundImage::AdjustSize);
|
||||
|
||||
_toaster->resize(184, 128);
|
||||
|
Loading…
Reference in New Issue
Block a user