diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp index 0fe8f396d44..cbe32d0fb7d 100644 --- a/src/gui/activitywidget.cpp +++ b/src/gui/activitywidget.cpp @@ -75,9 +75,11 @@ ActivityWidget::ActivityWidget(QWidget *parent) : // Create a widget container for the notifications. The ui file defines // a scroll area that get a widget with a layout as children - QWidget *w = new QWidget(this); - _notificationsLayout = new QVBoxLayout(this); + QWidget *w = new QWidget; + _notificationsLayout = new QVBoxLayout; w->setLayout(_notificationsLayout); + _notificationsLayout->setAlignment(Qt::AlignTop); + _ui->_notifyScroll->setAlignment(Qt::AlignTop); _ui->_notifyScroll->setWidget(w); showLabels(); @@ -157,7 +159,14 @@ void ActivityWidget::slotAccountActivityStatus(AccountState *ast, int statusCode } int accountCount = AccountManager::instance()->accounts().count(); - emit hideAcitivityTab(_accountsWithoutActivities.count() == accountCount); + + // hide the activity pane in case there are no accounts enabled. + if( _accountsWithoutActivities.count() == accountCount ) { + _ui->_headerLabel->hide(); + _ui->_activityList->hide(); + } + emit hideAcitivityTab(_accountsWithoutActivities.count() == accountCount + && _widgetForNotifId.count() == 0 ); // do not hide if there are notifications showLabels(); } @@ -323,6 +332,8 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list) scheduleWidgetToRemove(widgetToGo, 0); } + emit hideAcitivityTab(false); + _ui->_notifyLabel->setHidden( _widgetForNotifId.isEmpty() ); _ui->_notifyScroll->setHidden( _widgetForNotifId.isEmpty() ); diff --git a/src/gui/activitywidget.ui b/src/gui/activitywidget.ui index fefd7b3ae6b..79d9a963bc2 100644 --- a/src/gui/activitywidget.ui +++ b/src/gui/activitywidget.ui @@ -16,6 +16,12 @@ + + + 0 + 0 + + TextLabel @@ -32,6 +38,9 @@ true + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + @@ -46,6 +55,12 @@ + + + 0 + 0 + + TextLabel @@ -63,6 +78,12 @@ + + + 0 + 0 + + TextLabel diff --git a/src/gui/notificationwidget.ui b/src/gui/notificationwidget.ui index 099d11cac09..7f34baab5ec 100644 --- a/src/gui/notificationwidget.ui +++ b/src/gui/notificationwidget.ui @@ -11,7 +11,7 @@ - + 0 0 @@ -47,7 +47,7 @@ - + 0 0 @@ -59,6 +59,12 @@ + + + 0 + 0 + + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod temporm