ShareDialog: group links and users in one scrollbar.
authorCamila <hello@camila.codes>
Mon, 6 Dec 2021 19:29:47 +0000 (20:29 +0100)
committerMatthieu Gallien (Rebase PR Action) <matthieu_gallien@yahoo.fr>
Thu, 13 Jan 2022 10:39:11 +0000 (10:39 +0000)
- Remove the scrollbar used only for user shares
- Resize share dialog when removing share links
- Fix widget margins and max height of the share dialog
- slotAdjustScrollWidgetSize => adjustScrollWidgetSize

Signed-off-by: Camila <hello@camila.codes>
src/gui/sharedialog.cpp
src/gui/sharedialog.h
src/gui/sharedialog.ui
src/gui/sharelinkwidget.ui
src/gui/shareusergroupwidget.cpp
src/gui/shareusergroupwidget.h
src/gui/shareusergroupwidget.ui
src/gui/shareuserline.ui

index 1330729cd5385a99538f3a868f791b0d07970014..b88bf5409cc4e63dd5fcfe030b3671278548420d 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*
  * Copyright (C) by Roeland Jago Douma <roeland@famdouma.nl>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -138,18 +138,17 @@ ShareDialog::ShareDialog(QPointer<AccountState> accountState,
 
     initShareManager();
     
-    _scrollAreaLinksViewPort = new QWidget(_ui->scrollAreaLinks);
-    _scrollAreaLinksLayout = new QVBoxLayout(_scrollAreaLinksViewPort);
-    _scrollAreaLinksLayout->setContentsMargins(6, 6, 6, 6);
-    _ui->scrollAreaLinks->setWidget(_scrollAreaLinksViewPort);
+    _scrollAreaViewPort = new QWidget(_ui->scrollArea);
+    _scrollAreaLayout = new QVBoxLayout(_scrollAreaViewPort);
+    _scrollAreaLayout->setContentsMargins(0, 0, 0, 0);
+    _ui->scrollArea->setWidget(_scrollAreaViewPort);
 }
 
 ShareLinkWidget *ShareDialog::addLinkShareWidget(const QSharedPointer<LinkShare> &linkShare)
 {
-    _linkWidgetList.append(new ShareLinkWidget(_accountState->account(), _sharePath, _localPath, _maxSharingPermissions, _ui->scrollAreaLinks));
-    
-    const auto index = _linkWidgetList.size() - 1;
-    const auto linkShareWidget = _linkWidgetList.at(index);
+    const auto linkShareWidget = new ShareLinkWidget(_accountState->account(), _sharePath, _localPath, _maxSharingPermissions, _ui->scrollArea);
+    _linkWidgetList.append(linkShareWidget);
+
     linkShareWidget->setLinkShare(linkShare);
 
     connect(linkShare.data(), &Share::serverError, linkShareWidget, &ShareLinkWidget::slotServerError);
@@ -169,28 +168,25 @@ ShareLinkWidget *ShareDialog::addLinkShareWidget(const QSharedPointer<LinkShare>
     connect(this, &ShareDialog::styleChanged, linkShareWidget, &ShareLinkWidget::slotStyleChanged);
 
     _ui->verticalLayout->insertWidget(_linkWidgetList.size() + 1, linkShareWidget);
-    _scrollAreaLinksLayout->addWidget(linkShareWidget);
-    
-    // TO DO - the count is right but the bkg does not change
-    //linkShareWidget->setBackgroundRole(_scrollAreaLinksLayout->count() % 2 == 0 ? QPalette::Base : QPalette::AlternateBase);
+    _scrollAreaLayout->addWidget(linkShareWidget);
     
     linkShareWidget->setupUiOptions();
-     
+
     return linkShareWidget;
 }
 
 void ShareDialog::initLinkShareWidget()
 {
     if(_linkWidgetList.size() == 0) {
-        _emptyShareLinkWidget = new ShareLinkWidget(_accountState->account(), _sharePath, _localPath, _maxSharingPermissions, _ui->scrollAreaLinks);
+        _emptyShareLinkWidget = new ShareLinkWidget(_accountState->account(), _sharePath, _localPath, _maxSharingPermissions, _ui->scrollArea);
         _linkWidgetList.append(_emptyShareLinkWidget);
         connect(this, &ShareDialog::toggleShareLinkAnimation, _emptyShareLinkWidget, &ShareLinkWidget::slotToggleShareLinkAnimation);
         connect(_emptyShareLinkWidget, &ShareLinkWidget::createLinkShare, this, &ShareDialog::slotCreateLinkShare);
 
         connect(_emptyShareLinkWidget, &ShareLinkWidget::createPassword, this, &ShareDialog::slotCreatePasswordForLinkShare);
-        
+
         _ui->verticalLayout->insertWidget(_linkWidgetList.size()+1, _emptyShareLinkWidget);
-        _scrollAreaLinksLayout->addWidget(_emptyShareLinkWidget);
+        _scrollAreaLayout->addWidget(_emptyShareLinkWidget);
         _emptyShareLinkWidget->show();
     } else if (_emptyShareLinkWidget) {
         _emptyShareLinkWidget->hide();
@@ -205,7 +201,7 @@ void ShareDialog::slotAddLinkShareWidget(const QSharedPointer<LinkShare> &linkSh
     emit toggleShareLinkAnimation(true);
     const auto addedLinkShareWidget = addLinkShareWidget(linkShare);
     initLinkShareWidget();
-    slotAdjustScrollWidgetSize();
+    adjustScrollWidgetSize();
     if (linkShare->isPasswordSet()) {
         addedLinkShareWidget->focusPasswordLineEdit();
     }
@@ -227,21 +223,22 @@ void ShareDialog::slotSharesFetched(const QList<QSharedPointer<Share>> &shares)
         QSharedPointer<LinkShare> linkShare = qSharedPointerDynamicCast<LinkShare>(share);
         addLinkShareWidget(linkShare);
     }
-    
+
     initLinkShareWidget();
-    slotAdjustScrollWidgetSize();
+    adjustScrollWidgetSize();
     emit toggleShareLinkAnimation(false);
 }
 
-void ShareDialog::slotAdjustScrollWidgetSize()
+void ShareDialog::adjustScrollWidgetSize()
 {
-    auto count = this->findChildren<ShareLinkWidget *>().count();
-    count = count >= 6 ? 6 : count;
-    auto height = _linkWidgetList.size() > 0 ? _linkWidgetList.at(_linkWidgetList.size() - 1)->sizeHint().height() : 0;
-    _ui->scrollAreaLinks->setFixedWidth(_ui->verticalLayout->sizeHint().width());
-    _ui->scrollAreaLinks->setFixedHeight(height * count);
-    _ui->scrollAreaLinks->setVisible(height > 0);
-    _ui->scrollAreaLinks->setFrameShape(count > 6 ? QFrame::StyledPanel : QFrame::NoFrame);
+    const auto count = _scrollAreaLayout->count();
+    const auto margin = 10;
+    const auto height = _linkWidgetList.empty() ? 0 : _linkWidgetList.last()->sizeHint().height() + margin;
+    const auto totalHeight = height * count;
+    _ui->scrollArea->setFixedWidth(_ui->verticalLayout->sizeHint().width());
+    _ui->scrollArea->setFixedHeight(totalHeight > 400 ? 400 : totalHeight);
+    _ui->scrollArea->setVisible(height > 0);
+    _ui->scrollArea->setFrameShape(count > 6 ? QFrame::StyledPanel : QFrame::NoFrame);
 }
 
 ShareDialog::~ShareDialog()
@@ -302,19 +299,15 @@ void ShareDialog::showSharingUi()
         return;
     }
 
-    // We only do user/group sharing from 8.2.0
-    bool userGroupSharing =
-        theme->userGroupSharing()
-        && _accountState->account()->serverVersionInt() >= Account::makeServerVersion(8, 2, 0);
-
-    if (userGroupSharing) {
-        _userGroupWidget = new ShareUserGroupWidget(_accountState->account(), _sharePath, _localPath, _maxSharingPermissions, _privateLinkUrl, this);
-
+    if (theme->userGroupSharing()) {
+        _userGroupWidget = new ShareUserGroupWidget(_accountState->account(), _sharePath, _localPath, _maxSharingPermissions, _privateLinkUrl, _ui->scrollArea);
+        _userGroupWidget->getShares();
+        
         // Connect styleChanged events to our widget, so it can adapt (Dark-/Light-Mode switching)
         connect(this, &ShareDialog::styleChanged, _userGroupWidget, &ShareUserGroupWidget::slotStyleChanged);
 
         _ui->verticalLayout->insertWidget(1, _userGroupWidget);
-        _userGroupWidget->getShares();
+        _scrollAreaLayout->addLayout(_userGroupWidget->shareUserGroupLayout());
     }
 
     initShareManager();
@@ -401,9 +394,10 @@ void ShareDialog::slotDeleteShare()
     auto sharelinkWidget = dynamic_cast<ShareLinkWidget*>(sender());
     sharelinkWidget->hide();
     _ui->verticalLayout->removeWidget(sharelinkWidget);
+    _scrollAreaLayout->removeWidget(sharelinkWidget);
     _linkWidgetList.removeAll(sharelinkWidget);
     initLinkShareWidget();
-    slotAdjustScrollWidgetSize();
+    adjustScrollWidgetSize();
 }
 
 void ShareDialog::slotThumbnailFetched(const int &statusCode, const QByteArray &reply)
index 586bedcb76bf91089bdf6044070526b707bfd65c..531998d42b57abac05514d2a9796fb2200bca8e1 100644 (file)
@@ -68,7 +68,6 @@ private slots:
     void slotCreatePasswordForLinkShare(const QString &password);
     void slotCreatePasswordForLinkShareProcessed();
     void slotLinkShareRequiresPassword(const QString &message);
-    void slotAdjustScrollWidgetSize();
 
 signals:
     void toggleShareLinkAnimation(bool start);
@@ -82,6 +81,7 @@ private:
     void initShareManager();
     ShareLinkWidget *addLinkShareWidget(const QSharedPointer<LinkShare> &linkShare);
     void initLinkShareWidget();
+    void adjustScrollWidgetSize();
 
     Ui::ShareDialog *_ui;
 
@@ -99,8 +99,8 @@ private:
     ShareUserGroupWidget *_userGroupWidget = nullptr;
     QProgressIndicator *_progressIndicator = nullptr;
     
-    QWidget *_scrollAreaLinksViewPort = nullptr;
-    QVBoxLayout *_scrollAreaLinksLayout = nullptr;
+    QWidget *_scrollAreaViewPort = nullptr;
+    QVBoxLayout *_scrollAreaLayout = nullptr;
 };
 
 } // namespace OCC
index abaddada2b3195b078daa9758bc7d8643c4e46dc..e90458dbceeee444c7ba34ad37680c5ea94c9e98 100644 (file)
@@ -6,13 +6,25 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>387</width>
-    <height>222</height>
+    <width>480</width>
+    <height>280</height>
    </rect>
   </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>480</width>
+    <height>250</height>
+   </size>
+  </property>
   <layout class="QVBoxLayout" name="shareDialogVerticalLayout">
    <property name="spacing">
-    <number>9</number>
+    <number>0</number>
    </property>
    <property name="sizeConstraint">
     <enum>QLayout::SetFixedSize</enum>
    <item>
     <layout class="QVBoxLayout" name="verticalLayout">
      <property name="spacing">
-      <number>6</number>
+      <number>0</number>
      </property>
      <property name="sizeConstraint">
-      <enum>QLayout::SetFixedSize</enum>
+      <enum>QLayout::SetDefaultConstraint</enum>
      </property>
      <item>
       <layout class="QGridLayout" name="gridLayout" rowstretch="0,0" columnstretch="0,0">
       </layout>
      </item>
      <item>
-      <layout class="QVBoxLayout" name="scrollBarsVerticalLayout">
-       <property name="spacing">
-        <number>12</number>
+      <widget class="QScrollArea" name="scrollArea">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
        </property>
-       <item>
-        <widget class="QScrollArea" name="scrollAreaLinks">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="styleSheet">
-          <string notr="true"/>
-         </property>
-         <property name="frameShape">
-          <enum>QFrame::NoFrame</enum>
-         </property>
-         <property name="frameShadow">
-          <enum>QFrame::Plain</enum>
-         </property>
-         <property name="horizontalScrollBarPolicy">
-          <enum>Qt::ScrollBarAlwaysOff</enum>
-         </property>
-         <property name="sizeAdjustPolicy">
-          <enum>QAbstractScrollArea::AdjustIgnored</enum>
-         </property>
-         <property name="widgetResizable">
-          <bool>true</bool>
-         </property>
-         <widget class="QWidget" name="scrollAreaWidgetContentsLinks">
-          <property name="geometry">
-           <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>365</width>
-            <height>68</height>
-           </rect>
-          </property>
-         </widget>
-        </widget>
-       </item>
-       <item>
-        <widget class="QScrollArea" name="scrollAreaUsers">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="styleSheet">
-          <string notr="true"/>
-         </property>
-         <property name="frameShape">
-          <enum>QFrame::NoFrame</enum>
-         </property>
-         <property name="frameShadow">
-          <enum>QFrame::Plain</enum>
-         </property>
-         <property name="lineWidth">
-          <number>1</number>
-         </property>
-         <property name="horizontalScrollBarPolicy">
-          <enum>Qt::ScrollBarAlwaysOff</enum>
-         </property>
-         <property name="sizeAdjustPolicy">
-          <enum>QAbstractScrollArea::AdjustIgnored</enum>
-         </property>
-         <property name="widgetResizable">
-          <bool>true</bool>
-         </property>
-         <widget class="QWidget" name="scrollAreaWidgetContentsUsers">
-          <property name="geometry">
-           <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>365</width>
-            <height>68</height>
-           </rect>
-          </property>
-          <layout class="QVBoxLayout" name="scrollAreaVerticalLayout"/>
-         </widget>
-        </widget>
-       </item>
-      </layout>
+       <property name="minimumSize">
+        <size>
+         <width>0</width>
+         <height>200</height>
+        </size>
+       </property>
+       <property name="frameShape">
+        <enum>QFrame::NoFrame</enum>
+       </property>
+       <property name="frameShadow">
+        <enum>QFrame::Plain</enum>
+       </property>
+       <property name="verticalScrollBarPolicy">
+        <enum>Qt::ScrollBarAsNeeded</enum>
+       </property>
+       <property name="horizontalScrollBarPolicy">
+        <enum>Qt::ScrollBarAlwaysOff</enum>
+       </property>
+       <property name="sizeAdjustPolicy">
+        <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
+       </property>
+       <property name="widgetResizable">
+        <bool>true</bool>
+       </property>
+       <widget class="QWidget" name="scrollAreaWidgetContents">
+        <property name="geometry">
+         <rect>
+          <x>0</x>
+          <y>0</y>
+          <width>460</width>
+          <height>200</height>
+         </rect>
+        </property>
+       </widget>
+      </widget>
      </item>
     </layout>
    </item>
index 4cc42b1222a27ca0cc048ae83e7d75a94d996b10..a0d5f3df93bbe31d6aabde569f45886ae53d3401 100644 (file)
     <number>0</number>
    </property>
    <property name="leftMargin">
-    <number>6</number>
+    <number>12</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
    </property>
    <property name="rightMargin">
-    <number>6</number>
+    <number>20</number>
+   </property>
+   <property name="bottomMargin">
+    <number>0</number>
    </property>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout">
index b8a42eb819f1d4d4c498a01c23707c2c2bc24737..3c24925770ef80a1661ce55ce98b1063b604e732 100644 (file)
@@ -154,16 +154,18 @@ ShareUserGroupWidget::ShareUserGroupWidget(AccountPtr account,
     _completionTimer.setInterval(600);
 
     _ui->errorLabel->hide();
-
-    // TODO Progress Indicator where should it go?
-    // Setup the sharee search progress indicator
-    //_ui->shareeHorizontalLayout->addWidget(&_pi_sharee);
-
-    _parentScrollArea = parentWidget()->findChild<QScrollArea*>("scrollAreaUsers");
-
+    
+    _parentScrollArea = parentWidget()->findChild<QScrollArea*>("scrollArea");
+    _shareUserGroup = new QVBoxLayout(_parentScrollArea);
+    _shareUserGroup->setContentsMargins(0, 0, 0, 0);
     customizeStyle();
 }
 
+QVBoxLayout *ShareUserGroupWidget::shareUserGroupLayout()
+{
+    return _shareUserGroup;
+}   
+
 ShareUserGroupWidget::~ShareUserGroupWidget()
 {
     delete _ui;
@@ -247,17 +249,16 @@ void ShareUserGroupWidget::slotShareCreated(const QSharedPointer<Share> &share)
 
 void ShareUserGroupWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shares)
 {
-    QScrollArea *scrollArea = _parentScrollArea;
-
-    auto newViewPort = new QWidget(scrollArea);
-    auto layout = new QVBoxLayout(newViewPort);
-    layout->setContentsMargins(0, 0, 0, 0);
     int x = 0;
-    int height = 0;
     QList<QString> linkOwners({});
 
     ShareUserLine *justCreatedShareThatNeedsPassword = nullptr;
-
+       
+    while (QLayoutItem *shareUserLine = _shareUserGroup->takeAt(0)) {
+        delete shareUserLine->widget();
+        delete shareUserLine;
+    }
+    
     foreach (const auto &share, shares) {
         // We don't handle link shares, only TypeUser or TypeGroup
         if (share->getShareType() == Share::TypeLink) {
@@ -278,14 +279,12 @@ void ShareUserGroupWidget::slotSharesFetched(const QList<QSharedPointer<Share>>
         Q_ASSERT(Share::isShareTypeUserGroupEmailRoomOrRemote(share->getShareType()));
         auto userGroupShare = qSharedPointerDynamicCast<UserGroupShare>(share);
         auto *s = new ShareUserLine(_account, userGroupShare, _maxSharingPermissions, _isFile, _parentScrollArea);
-        connect(s, &ShareUserLine::resizeRequested, this, &ShareUserGroupWidget::slotAdjustScrollWidgetSize);
         connect(s, &ShareUserLine::visualDeletionDone, this, &ShareUserGroupWidget::getShares);
-        s->setBackgroundRole(layout->count() % 2 == 0 ? QPalette::Base : QPalette::AlternateBase);
+        s->setBackgroundRole(_shareUserGroup->count() % 2 == 0 ? QPalette::Base : QPalette::AlternateBase);
 
         // Connect styleChanged events to our widget, so it can adapt (Dark-/Light-Mode switching)
         connect(this, &ShareUserGroupWidget::styleChanged, s, &ShareUserLine::slotStyleChanged);
-
-        layout->addWidget(s);
+        _shareUserGroup->addWidget(s);
 
         if (!_lastCreatedShareId.isEmpty() && share->getId() == _lastCreatedShareId) {
             _lastCreatedShareId = QString();
@@ -295,27 +294,14 @@ void ShareUserGroupWidget::slotSharesFetched(const QList<QSharedPointer<Share>>
         }
 
         x++;
-        if (x <= 3) {
-            height = newViewPort->sizeHint().height();
-        }
     }
 
     foreach (const QString &owner, linkOwners) {
         auto ownerLabel = new QLabel(QString(owner + " shared via link"));
-        layout->addWidget(ownerLabel);
+        _shareUserGroup->addWidget(ownerLabel);
         ownerLabel->setVisible(true);
-
-        x++;
-        if (x <= 6) {
-            height = newViewPort->sizeHint().height();
-        }
     }
-
-    scrollArea->setFrameShape(x > 6 ? QFrame::StyledPanel : QFrame::NoFrame);
-    scrollArea->setVisible(!shares.isEmpty());
-    scrollArea->setFixedHeight(height);
-    scrollArea->setWidget(newViewPort);
-
+    
     _disableCompleterActivated = false;
     activateShareeLineEdit();
 
@@ -325,24 +311,6 @@ void ShareUserGroupWidget::slotSharesFetched(const QList<QSharedPointer<Share>>
     }
 }
 
-void ShareUserGroupWidget::slotAdjustScrollWidgetSize()
-{
-    QScrollArea *scrollArea = _parentScrollArea;
-    const auto shareUserLineChilds = scrollArea->findChildren<ShareUserLine *>();
-
-    // Ask the child widgets to calculate their size
-    for (const auto shareUserLineChild : shareUserLineChilds) {
-        shareUserLineChild->adjustSize();
-    }
-
-    const auto shareUserLineChildsCount = shareUserLineChilds.count();
-    scrollArea->setVisible(shareUserLineChildsCount > 0);
-    if (shareUserLineChildsCount > 0 && shareUserLineChildsCount <= 3) {
-        scrollArea->setFixedHeight(scrollArea->widget()->sizeHint().height());
-    }
-    scrollArea->setFrameShape(shareUserLineChildsCount > 3 ? QFrame::StyledPanel : QFrame::NoFrame);
-}
-
 void ShareUserGroupWidget::slotPrivateLinkShare()
 {
     auto menu = new QMenu(this);
@@ -380,22 +348,11 @@ void ShareUserGroupWidget::slotCompleterActivated(const QModelIndex &index)
         return;
     }
 
-// TODO Progress Indicator where should it go?
-//    auto indicator = new QProgressIndicator(viewPort);
-//    indicator->startAnimation();
-//    if (layout->count() == 1) {
-//        // No shares yet! Remove the label, add some stretch.
-//        delete layout->itemAt(0)->widget();
-//        layout->addStretch(1);
-//    }
-//    layout->insertWidget(layout->count() - 1, indicator);
-
     /*
      * Don't send the reshare permissions for federated shares for servers <9.1
      * https://github.com/owncloud/core/issues/22122#issuecomment-185637344
      * https://github.com/owncloud/client/issues/4996
      */
-
     _lastCreatedShareId = QString();
     
     QString password;
index 599ab521b55751bfad2361b27abc3bc4e60ff2ec..d8122a4897a3b23974b073bb6b5763d4a4347a43 100644 (file)
@@ -77,6 +77,8 @@ public:
         const QString &privateLinkUrl,
         QWidget *parent = nullptr);
     ~ShareUserGroupWidget() override;
+    
+    QVBoxLayout *shareUserGroupLayout();
 
 signals:
     void togglePublicLinkShare(bool);
@@ -98,7 +100,6 @@ private slots:
     void slotCompleterActivated(const QModelIndex &index);
     void slotCompleterHighlighted(const QModelIndex &index);
     void slotShareesReady();
-    void slotAdjustScrollWidgetSize();
     void slotPrivateLinkShare();
     void displayError(int code, const QString &message);
 
@@ -113,6 +114,7 @@ private:
 
     Ui::ShareUserGroupWidget *_ui;
     QScrollArea *_parentScrollArea;
+    QVBoxLayout *_shareUserGroup;
     AccountPtr _account;
     QString _sharePath;
     QString _localPath;
index 4aa9b1693d6489e9553b6163465bef7d981755d6..38c45a23d033e40a3d2fae928ed9fc78e19050f5 100644 (file)
    </sizepolicy>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <property name="leftMargin">
+    <number>6</number>
+   </property>
+   <property name="topMargin">
+    <number>6</number>
+   </property>
+   <property name="rightMargin">
+    <number>6</number>
+   </property>
+   <property name="bottomMargin">
+    <number>6</number>
+   </property>
    <item>
     <widget class="QLabel" name="mainOwnerLabel">
      <property name="sizePolicy">
index 9576b41a7b9b02aa036eebb4cb881cb9efb0744f..761be94d0172642455558efea1ddcdcf12f95de1 100644 (file)
    <bool>false</bool>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <property name="leftMargin">
+    <number>12</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>20</number>
+   </property>
+   <property name="bottomMargin">
+    <number>0</number>
+   </property>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout_2">
      <property name="spacing">
       <number>6</number>
      </property>
      <property name="rightMargin">
-      <number>22</number>
+      <number>0</number>
      </property>
      <item>
       <widget class="QLabel" name="avatar">