From 32bb1ca449fb8be976724847e61c4a4a75170c05 Mon Sep 17 00:00:00 2001 From: Camila San Date: Mon, 30 Jul 2018 22:09:27 +0200 Subject: [PATCH] Aligns copy button to the left in the activity widget. Signed-off-by: Camila San --- src/gui/activitywidget.cpp | 5 ++-- src/gui/activitywidget.h | 2 -- src/gui/activitywidget.ui | 58 +++++++++++++++++++++++++------------- 3 files changed, 40 insertions(+), 25 deletions(-) diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp index 0bfff6d9fa..8327e9adc9 100644 --- a/src/gui/activitywidget.cpp +++ b/src/gui/activitywidget.cpp @@ -77,9 +77,8 @@ ActivityWidget::ActivityWidget(AccountState *accountState, QWidget *parent) connect(_model, &ActivityListModel::activityJobStatusCode, this, &ActivityWidget::slotAccountActivityStatus); - _copyBtn = _ui->_dialogButtonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole); - _copyBtn->setToolTip(tr("Copy the activity list to the clipboard.")); - connect(_copyBtn, &QAbstractButton::clicked, this, &ActivityWidget::copyToClipboard); + _ui->_copyButton->setToolTip(tr("Copy the activity list to the clipboard.")); + connect(_ui->_copyButton, &QPushButton::click, this, &ActivityWidget::copyToClipboard); connect(_model, &QAbstractItemModel::rowsInserted, this, &ActivityWidget::rowsInserted); diff --git a/src/gui/activitywidget.h b/src/gui/activitywidget.h index 660a84ec94..ffd301d40b 100644 --- a/src/gui/activitywidget.h +++ b/src/gui/activitywidget.h @@ -104,8 +104,6 @@ private: void showLabels(); QString timeString(QDateTime dt, QLocale::FormatType format) const; Ui::ActivityWidget *_ui; - QPushButton *_copyBtn; - QSet _accountsWithoutActivities; QMap _widgetForNotifId; QElapsedTimer _guiLogTimer; diff --git a/src/gui/activitywidget.ui b/src/gui/activitywidget.ui index 759065dbcf..b6aa092ef6 100644 --- a/src/gui/activitywidget.ui +++ b/src/gui/activitywidget.ui @@ -78,25 +78,6 @@ Form - - - - - 0 - 0 - - - - TextLabel - - - Qt::RichText - - - - - - @@ -204,11 +185,48 @@ + + + + + 0 + 0 + + + + TextLabel + + + Qt::RichText + + + + + + + + 0 + 0 + + + + + 120 + 30 + + + + margin-left:40px; + + + Copy + + + _activityList - _dialogButtonBox