mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
[Facebook] Add hability to choose size of profile
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9b1a949a39
commit
f159802053
3 changed files with 58 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue