mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-01 04:46:47 -05:00
Added gif & webp for RichtextEditor
* Added gif & webp for RichtextEditor picture attachments * Attempt to fix attached picture layout issue on Card View
This commit is contained in:
parent
99aca410a9
commit
b96fecfcbb
2 changed files with 10 additions and 20 deletions
|
|
@ -585,7 +585,7 @@ void RichTextEdit::setText(const QString& text) {
|
|||
|
||||
void RichTextEdit::insertImage() {
|
||||
QString file;
|
||||
if (misc::getOpenFileName(window(), RshareSettings::LASTDIR_IMAGES, tr("Load Picture File"), "Pictures (*.png *.xpm *.jpg *.jpeg)", file)) {
|
||||
if (misc::getOpenFileName(window(), RshareSettings::LASTDIR_IMAGES, tr("Load Picture File"), "Pictures (*.png *.xpm *.jpg *.jpeg *.gif *.webp)", file)) {
|
||||
QString encodedImage;
|
||||
if (RsHtml::makeEmbeddedImage(file, encodedImage, 640*480, MAX_ALLOWED_GXS_MESSAGE_SIZE - 200)) {
|
||||
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(encodedImage);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue