mirror of
https://github.com/status-im/snorenotify.git
synced 2025-01-26 16:29:59 +00:00
qt4 build fix
This commit is contained in:
parent
b72e121728
commit
2175f42fd3
@ -27,7 +27,11 @@
|
|||||||
using namespace Snore;
|
using namespace Snore;
|
||||||
|
|
||||||
NotifyWidget::NotifyWidget(int pos,QWidget *parent) :
|
NotifyWidget::NotifyWidget(int pos,QWidget *parent) :
|
||||||
QWidget(parent, Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus),
|
QWidget(parent, Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||||
|
| Qt::WindowDoesNotAcceptFocus
|
||||||
|
#endif
|
||||||
|
),
|
||||||
ui(new Ui::NotifyWidget),
|
ui(new Ui::NotifyWidget),
|
||||||
m_moveTimer(new QTimer(this)),
|
m_moveTimer(new QTimer(this)),
|
||||||
m_desktop(QDesktopWidget().availableGeometry()),
|
m_desktop(QDesktopWidget().availableGeometry()),
|
||||||
@ -68,6 +72,11 @@ NotifyWidget::NotifyWidget(int pos,QWidget *parent) :
|
|||||||
m_moveTimer->setInterval(2);
|
m_moveTimer->setInterval(2);
|
||||||
connect( m_moveTimer, SIGNAL(timeout()), this, SLOT(slotMove()));
|
connect( m_moveTimer, SIGNAL(timeout()), this, SLOT(slotMove()));
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)//ugly bug in qt4 makes the widget resize
|
||||||
|
ui->titel->setWordWrap(true);
|
||||||
|
ui->body->setWordWrap(true);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NotifyWidget::~NotifyWidget()
|
NotifyWidget::~NotifyWidget()
|
||||||
@ -78,7 +87,7 @@ NotifyWidget::~NotifyWidget()
|
|||||||
|
|
||||||
void NotifyWidget::display(const Notification ¬ification)
|
void NotifyWidget::display(const Notification ¬ification)
|
||||||
{
|
{
|
||||||
update(notification);
|
update(notification);
|
||||||
m_dist = 0;
|
m_dist = 0;
|
||||||
m_moveTimer->start();
|
m_moveTimer->start();
|
||||||
snoreDebug( SNORE_DEBUG ) << notification.id();
|
snoreDebug( SNORE_DEBUG ) << notification.id();
|
||||||
|
@ -176,9 +176,6 @@
|
|||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user