[Pkg-owncloud-commits] [owncloud-client] 297/470: ActivityWidget: Properly set widget for the Scrollview.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:25:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 2ec642aadb8a40e848e00e6a1f5d9b6591e42666
Author: Klaas Freitag <freitag at owncloud.com>
Date: Mon Apr 11 15:38:25 2016 +0200
ActivityWidget: Properly set widget for the Scrollview.
Also fixed some SizePolicy settings.
---
src/gui/activitywidget.cpp | 6 ++++--
src/gui/activitywidget.ui | 21 +++++++++++++++++++++
src/gui/notificationwidget.ui | 10 ++++++++--
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp
index a15c2f7..e0459d6 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();
diff --git a/src/gui/activitywidget.ui b/src/gui/activitywidget.ui
index fefd7b3..79d9a96 100644
--- a/src/gui/activitywidget.ui
+++ b/src/gui/activitywidget.ui
@@ -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>
diff --git a/src/gui/notificationwidget.ui b/src/gui/notificationwidget.ui
index 099d11c..7f34baa 100644
--- a/src/gui/notificationwidget.ui
+++ b/src/gui/notificationwidget.ui
@@ -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>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list