diff --git a/retroshare-gui/src/gui/PhotoShare/AlbumItem.ui b/retroshare-gui/src/gui/PhotoShare/AlbumItem.ui index 0ab51b8d4..88ef3770d 100644 --- a/retroshare-gui/src/gui/PhotoShare/AlbumItem.ui +++ b/retroshare-gui/src/gui/PhotoShare/AlbumItem.ui @@ -91,6 +91,19 @@ p, li { white-space: pre-wrap; } + + + + Qt::Vertical + + + + 20 + 40 + + + + diff --git a/retroshare-gui/src/gui/PhotoShare/PhotoCommentItem.ui b/retroshare-gui/src/gui/PhotoShare/PhotoCommentItem.ui index 792a69107..a11bcd470 100644 --- a/retroshare-gui/src/gui/PhotoShare/PhotoCommentItem.ui +++ b/retroshare-gui/src/gui/PhotoShare/PhotoCommentItem.ui @@ -6,14 +6,17 @@ 0 0 - 411 - 84 + 392 + 63 Form + + 0 + diff --git a/retroshare-gui/src/gui/PhotoShare/PhotoDialog.cpp b/retroshare-gui/src/gui/PhotoShare/PhotoDialog.cpp index a8469cace..9c7d69986 100644 --- a/retroshare-gui/src/gui/PhotoShare/PhotoDialog.cpp +++ b/retroshare-gui/src/gui/PhotoShare/PhotoDialog.cpp @@ -13,7 +13,7 @@ PhotoDialog::PhotoDialog(RsPhotoV2 *rs_photo, const RsPhotoPhoto &photo, QWidget { ui->setupUi(this); setAttribute ( Qt::WA_DeleteOnClose, true ); - connect(ui->toolButton_AddComment, SIGNAL(clicked()), this, SLOT(addComment())); + connect(ui->toolButton_AddComment, SIGNAL(clicked()), this, SLOT(createComment())); setUp(); } @@ -31,7 +31,7 @@ void PhotoDialog::setUp() ui->label_Photo->setPixmap(qtn); ui->lineEdit_Title->setText(QString::fromStdString(mPhotoDetails.mMeta.mMsgName)); - ui->scrollAreaWidgetContents->setLayout(new QVBoxLayout()); + //ui->scrollAreaWidgetContents->setLayout(new QVBoxLayout()); requestComments(); } @@ -49,12 +49,12 @@ void PhotoDialog::addComment() void PhotoDialog::clearComments() { - QLayout* l = ui->scrollAreaWidgetContents->layout(); + //QLayout* l = ui->scrollAreaWidgetContents->layout(); QSetIterator sit(mComments); while(sit.hasNext()) { PhotoCommentItem* item = sit.next(); - l->removeWidget(item); + ui->verticalLayout->removeWidget(item); item->setParent(NULL); delete item; } @@ -65,11 +65,11 @@ void PhotoDialog::clearComments() void PhotoDialog::resetComments() { QSetIterator sit(mComments); - QLayout* l = ui->scrollAreaWidgetContents->layout(); + //QLayout* l = ui->scrollAreaWidgetContents->layout(); while(sit.hasNext()) { PhotoCommentItem* item = sit.next(); - l->addWidget(item); + ui->verticalLayout->insertWidget(0,item); } } @@ -90,10 +90,8 @@ void PhotoDialog::requestComments() void PhotoDialog::createComment() { - if(mCommentDialog) - { RsPhotoComment comment; - QString commentString = mCommentDialog->getComment(); + QString commentString = ui->lineEdit->text(); comment.mComment = commentString.toStdString(); @@ -102,11 +100,8 @@ void PhotoDialog::createComment() comment.mMeta.mParentId = mPhotoDetails.mMeta.mOrigMsgId; mRsPhoto->submitComment(token, comment); mPhotoQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0); - - mCommentDialog->close(); - delete mCommentDialog; - mCommentDialog = NULL; - } + + ui->lineEdit->clear(); } diff --git a/retroshare-gui/src/gui/PhotoShare/PhotoDialog.ui b/retroshare-gui/src/gui/PhotoShare/PhotoDialog.ui index 6631999cc..3171923b9 100644 --- a/retroshare-gui/src/gui/PhotoShare/PhotoDialog.ui +++ b/retroshare-gui/src/gui/PhotoShare/PhotoDialog.ui @@ -6,196 +6,56 @@ 0 0 - 516 - 460 + 615 + 566 Dialog - - - - - - - - - - 0 - 1 - - - - Photo - - - - - - - 0 - 0 - - - - - 200 - 300 - - - - TextLabel - - - - - - - - - - - 0 - 0 - - - - - 50 - 200 - - - - Summary - - - - - - false - - - - 0 - 0 - - - - - - - - Caption - - - - - - - false - - - - 0 - 0 - - - - - - - - Where: - - - - - - - false - - - - 0 - 0 - - - - - - - - false - - - - 0 - 0 - - - - - - - - Photo Title: - - - - - - - When - - - - - - - - - + + + + + + 0 + 1 + + + + Photo + + + + + + + 0 + 0 + + + + + 200 + 300 + + + + TextLabel + + + + + - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Add Comment - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - + + + + 0 + 0 + + true @@ -204,13 +64,131 @@ 0 0 - 496 - 69 + 325 + 18 + + + 0 + 0 + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + Summary + + + + + + false + + + + 0 + 0 + + + + + + + + Caption + + + + + + + false + + + + 0 + 0 + + + + + + + + Where: + + + + + + + false + + + + 0 + 0 + + + + + + + + false + + + + 0 + 0 + + + + + + + + Photo Title: + + + + + + + When + + + + + + + + + + + + + Comment + + + diff --git a/retroshare-gui/src/gui/PhotoShare/PhotoItem.ui b/retroshare-gui/src/gui/PhotoShare/PhotoItem.ui index b49b45ff3..7162fd137 100644 --- a/retroshare-gui/src/gui/PhotoShare/PhotoItem.ui +++ b/retroshare-gui/src/gui/PhotoShare/PhotoItem.ui @@ -7,7 +7,7 @@ 0 0 253 - 222 + 233 @@ -79,8 +79,7 @@ p, li { white-space: pre-wrap; } - - + @@ -88,6 +87,19 @@ p, li { white-space: pre-wrap; } + + + + Qt::Vertical + + + + 20 + 40 + + + +