diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp index a66aac6e0..ed21fd86d 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp @@ -75,6 +75,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId connect(removeAllFilesButton, SIGNAL(clicked() ), this , SLOT(clearAllAttachments())); //connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile())); connect(subjectEdit,SIGNAL(textChanged(const QString&)),this,SLOT(updatePreviewText(const QString&))); + connect(expandButton, SIGNAL(clicked()), this, SLOT( toggle())); connect(addThumbnailButton, SIGNAL(clicked() ), this , SLOT(addThumbnail())); connect(thumbNailCb, SIGNAL(toggled(bool)), this, SLOT(allowAutoMediaThumbNail(bool))); @@ -86,6 +87,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId channelpostButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png")); attachmentsButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/attachements.png")); addThumbnailButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-image.png")); + expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png"))); aspectRatio_CB->setItemIcon(0,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-auto.svg")); aspectRatio_CB->setItemIcon(1,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-1-1.svg")); @@ -926,3 +928,22 @@ void CreateGxsChannelMsg::on_attachmentsButton_clicked() { stackedWidget->setCurrentIndex(1); } + +void CreateGxsChannelMsg::toggle() +{ + if (expandButton->isChecked()) + { + thumbnailFrame->hide(); + gridLayoutTextEdit->setContentsMargins(0,9,0,0); + expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png"))); + expandButton->setToolTip(tr("Show")); + } + else + { + thumbnailFrame->show(); + gridLayoutTextEdit->setContentsMargins(0,0,0,0); + expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png"))); + expandButton->setToolTip(tr("Hide")); + } +} + diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.h b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.h index 882137b67..c527f35ae 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.h +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.h @@ -57,6 +57,7 @@ protected: virtual void dropEvent(QDropEvent *event); private slots: + void toggle() ; void addExtraFile(); void checkAttachmentReady(); void deleteAttachment(); diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui index bc8574587..8e5a6d1c6 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.ui @@ -57,10 +57,10 @@ 0 - - + + - Attachments + Channel Post @@ -70,7 +70,58 @@ - + + + + 9 + + + + + Generate mass data + + + + + + + 1 + + + 999 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Post + + + + + + + Cancel + + + + + + true @@ -85,192 +136,192 @@ 0 - + 0 + + 0 + 0 - - - - - - - 0 - 0 - - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - - - 6 + + 0 + + + + + QFrame::NoFrame - - - - - 0 - 0 - - - - - 75 - true - - - - Channel Post to: - - - - - - - true - - - true - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + QFrame::Plain + + + + 6 + + + 9 + + + 6 + + + 0 + + + + + 6 + + + + + + 0 + 0 + + + + + + + + Qt::Vertical + + + + 20 + 1 + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Attachments:</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/images/feedback_arrow.png" /><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;"> Use Drag and Drop / Add Files button, to Hash new files.</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/images/feedback_arrow.png" /><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;"> Copy/Paste RetroShare links from your shares</span></p></body></html> - + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + Add Channel Thumbnail + + + + 24 + 24 + + + + + + + + <html><head/><body><p>Choose aspect ratio policy. In 'Auto' mode, the most suitable aspect ratio is chosen for you.</p></body></html> + + + + 24 + 24 + + + + + Auto + + + + + 1:1 + + + + + 3:4 + + + + + 16:9 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + - - - - - - Add Channel Thumbnail - - - - 24 - 24 - - - - - - - - <html><head/><body><p>Choose aspect ratio policy. In 'Auto' mode, the most suitable aspect ratio is chosen for you.</p></body></html> - - - - 24 - 24 - - - - - Auto - - - - - 1:1 - - - - - 3:4 - - - - - 16:9 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 40 - 20 - - - - - - - - + + - 9 + 6 - + Title - - - - Qt::Vertical + + + + <html><head/><body><p>Hide</p></body></html> - - - 20 - 40 - + + - + + true + + + + + + + + 0 + 0 + + + - - - - - 0 - 0 - - - - @@ -344,7 +395,7 @@ p, li { white-space: pre-wrap; } - <html><head/><body><p>Add File</p></body></html> + <html><head/><body><p>Remove File</p></body></html> @@ -393,7 +444,7 @@ p, li { white-space: pre-wrap; } 0 0 - 827 + 824 24 @@ -444,23 +495,10 @@ p, li { white-space: pre-wrap; } - - - - Qt::Horizontal - - - - 486 - 20 - - - - - - + + - Channel Post + Attachments @@ -470,52 +508,46 @@ p, li { white-space: pre-wrap; } - - + + 9 + + 6 + + + 6 + + + 6 + - + + + + 0 + 0 + + + + + 75 + true + + - Generate mass data + Channel Post to: - - - 1 + + + true - - 999 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Post - - - - - - - Cancel + + true