diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2017-09-29 14:33:20 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-09-29 12:57:34 -0700 |
commit | f159802053a7dddb2f86db2781eb0071b13b5735 (patch) | |
tree | d5c93fff712970b897e57700c7c78cbf3ffab2fe /desktop-widgets/plugins/facebook/facebookconnectwidget.cpp | |
parent | 9b1a949a39afaa4e5d79aaf394f382bf3063f931 (diff) | |
download | subsurface-f159802053a7dddb2f86db2781eb0071b13b5735.tar.gz |
[Facebook] Add hability to choose size of profile
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/plugins/facebook/facebookconnectwidget.cpp')
-rw-r--r-- | desktop-widgets/plugins/facebook/facebookconnectwidget.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp index 49ac72861..1e35623b8 100644 --- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp +++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp @@ -194,8 +194,13 @@ void FacebookManager::sendDive() ProfileWidget2 *profile = MainWindow::instance()->graphics(); + QSize size = dialog.profileSize() == SocialNetworkDialog::SMALL ? QSize(800,600) + : dialog.profileSize() == SocialNetworkDialog::MEDIUM ? QSize(1024,760) + : dialog.profileSize() == SocialNetworkDialog::BIG ? QSize(1280,1024) + : QSize(); + auto currSize = profile->size(); - profile->resize(1024,768); + profile->resize(size); profile->setToolTipVisibile(false); QPixmap pix = profile->grab(); profile->setToolTipVisibile(true); @@ -320,6 +325,15 @@ SocialNetworkDialog::SocialNetworkDialog(QWidget *parent) : connect(ui->album, &QLineEdit::editingFinished, this, &SocialNetworkDialog::albumChanged); } +SocialNetworkDialog::Size SocialNetworkDialog::profileSize() const +{ + QString currText = ui->profileSize->currentText(); + return currText.startsWith(tr("Small")) ? SMALL : + currText.startsWith(tr("Medium")) ? MEDIUM : + /* currText.startsWith(tr("Big")) ? */ BIG; +} + + void SocialNetworkDialog::albumChanged() { QAbstractButton *button = ui->buttonBox->button(QDialogButtonBox::Ok); |