Aligns copy button to the left in the activity widget.

Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
Camila San 2018-07-30 22:09:27 +02:00
parent a149660ae9
commit 32bb1ca449
No known key found for this signature in database
GPG key ID: 7A4A6121E88E2AD4
3 changed files with 40 additions and 25 deletions

View file

@ -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);

View file

@ -104,8 +104,6 @@ private:
void showLabels();
QString timeString(QDateTime dt, QLocale::FormatType format) const;
Ui::ActivityWidget *_ui;
QPushButton *_copyBtn;
QSet<QString> _accountsWithoutActivities;
QMap<Activity::Identifier, NotificationWidget *> _widgetForNotifId;
QElapsedTimer _guiLogTimer;

View file

@ -78,25 +78,6 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" 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>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QDialogButtonBox" name="_dialogButtonBox"/>
</item>
<item row="0" column="0">
<widget class="QListView" name="_activityList">
<property name="sizePolicy">
@ -204,11 +185,48 @@
</property>
</widget>
</item>
<item row="1" 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>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="_copyButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>120</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">margin-left:40px;</string>
</property>
<property name="text">
<string>Copy</string>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>_activityList</tabstop>
<tabstop>_dialogButtonBox</tabstop>
</tabstops>
<resources/>
<connections/>