mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Merge pull request #4659 from owncloud/fix_client_4651
Fix client #4651
This commit is contained in:
commit
ed3203d25d
3 changed files with 43 additions and 5 deletions
|
@ -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() );
|
||||
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="_notifyLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
|
@ -32,6 +38,9 @@
|
|||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<widget class="QWidget" name="_scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
@ -46,6 +55,12 @@
|
|||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="_headerLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
|
@ -63,6 +78,12 @@
|
|||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="_bottomLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -47,7 +47,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="_subjectLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -59,6 +59,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="_messageLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod temporm </string>
|
||||
</property>
|
||||
|
|
Loading…
Reference in a new issue