mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 05:25:50 +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
|
// Create a widget container for the notifications. The ui file defines
|
||||||
// a scroll area that get a widget with a layout as children
|
// a scroll area that get a widget with a layout as children
|
||||||
QWidget *w = new QWidget(this);
|
QWidget *w = new QWidget;
|
||||||
_notificationsLayout = new QVBoxLayout(this);
|
_notificationsLayout = new QVBoxLayout;
|
||||||
w->setLayout(_notificationsLayout);
|
w->setLayout(_notificationsLayout);
|
||||||
|
_notificationsLayout->setAlignment(Qt::AlignTop);
|
||||||
|
_ui->_notifyScroll->setAlignment(Qt::AlignTop);
|
||||||
_ui->_notifyScroll->setWidget(w);
|
_ui->_notifyScroll->setWidget(w);
|
||||||
|
|
||||||
showLabels();
|
showLabels();
|
||||||
|
@ -157,7 +159,14 @@ void ActivityWidget::slotAccountActivityStatus(AccountState *ast, int statusCode
|
||||||
}
|
}
|
||||||
|
|
||||||
int accountCount = AccountManager::instance()->accounts().count();
|
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();
|
showLabels();
|
||||||
}
|
}
|
||||||
|
@ -323,6 +332,8 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
|
||||||
scheduleWidgetToRemove(widgetToGo, 0);
|
scheduleWidgetToRemove(widgetToGo, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit hideAcitivityTab(false);
|
||||||
|
|
||||||
_ui->_notifyLabel->setHidden( _widgetForNotifId.isEmpty() );
|
_ui->_notifyLabel->setHidden( _widgetForNotifId.isEmpty() );
|
||||||
_ui->_notifyScroll->setHidden( _widgetForNotifId.isEmpty() );
|
_ui->_notifyScroll->setHidden( _widgetForNotifId.isEmpty() );
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,12 @@
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="_notifyLabel">
|
<widget class="QLabel" name="_notifyLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -32,6 +38,9 @@
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="_scrollAreaWidgetContents">
|
<widget class="QWidget" name="_scrollAreaWidgetContents">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
|
@ -46,6 +55,12 @@
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="_headerLabel">
|
<widget class="QLabel" name="_headerLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -63,6 +78,12 @@
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="_bottomLabel">
|
<widget class="QLabel" name="_bottomLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="_subjectLabel">
|
<widget class="QLabel" name="_subjectLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -59,6 +59,12 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="_messageLabel">
|
<widget class="QLabel" name="_messageLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod temporm </string>
|
<string>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod temporm </string>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue