From 5efd318cb596aa18372ab5788d98fb10478744f7 Mon Sep 17 00:00:00 2001 From: hunbernd Date: Sun, 5 Jan 2020 21:00:13 +0100 Subject: [PATCH] Rise post size --- retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp | 3 ++- retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h | 2 +- retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp index 4cfe282e9..9e1e64d5c 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp @@ -62,6 +62,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos ui->hashBox->setAutoHide(true); ui->hashBox->setDefaultTransferRequestFlags(RS_FILE_REQ_ANONYMOUS_ROUTING); connect(ui->hashBox, SIGNAL(fileHashingFinished(QList)), this, SLOT(fileHashingFinished(QList))); + ui->sizeWarningLabel->setText(QString("Post size is limited to %1 KB, pictures will be downscaled.").arg(MAXMESSAGESIZE / 1024)); /* fill in the available OwnIds for signing */ ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId()); @@ -189,7 +190,7 @@ void PostedCreatePostDialog::addPicture() } QImage opt; - if(ImageUtil::optimizeSizeBytes(imagebytes, image, opt, 800*600, MAXMESSAGESIZE - 1000)) { //Leave space for other stuff + if(ImageUtil::optimizeSizeBytes(imagebytes, image, opt, 800*600, MAXMESSAGESIZE - 2000)) { //Leave space for other stuff ui->imageLabel->setPixmap(QPixmap::fromImage(opt)); } else { imagefilename = ""; diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h index 4a5dc7788..5aed59950 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h @@ -47,7 +47,7 @@ public: private: QString imagefilename; QByteArray imagebytes; - const int MAXMESSAGESIZE = 32000; + const int MAXMESSAGESIZE = 199000; private slots: void createPost(); diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui index 60ecfa3ec..a4ecfbb6c 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.ui @@ -187,7 +187,7 @@ - + Post size is limited to 32 KB, pictures will be downscaled.