Added to use on AvatarWidget on click the Avatar Dialog

* Added to use the Avatar Dialog for the AvatarWidget too
* Fixed the info text
* Update stylesheet for the info frame
This commit is contained in:
defnax 2021-01-19 22:30:35 +01:00
parent ed228485d0
commit 53ab47cf4a
3 changed files with 20 additions and 26 deletions

View file

@ -19,7 +19,6 @@
*******************************************************************************/
#include <QBuffer>
#include <QDesktopWidget>
#include <QFile>
#include <QDir>
#include <QGridLayout>
@ -163,7 +162,8 @@ void AvatarDialog::loadAvatarWidget()
if(stickerTabs.count() == 0) {
ui->nostickersLabel->setText("");
QString message = "No stickers installed.\nYou can install them by putting images into one of these folders:\n" + stickerFolders.join('\n');
QString message = "No stickers installed.\nYou can install them by putting images into one of these folders:\n" /*+ stickerFolders.join('\n')*/;
message += "RetroShare/stickers\n RetroShare/Data/stickers\n RetroShare/Data/Location/stickers";
ui->nostickersLabel->setText(message);
} else {
ui->infoframe->hide();
@ -243,7 +243,7 @@ void AvatarDialog::loadAvatarWidget()
button->setFixedSize(QSize(buttonWidth, buttonHeight));
if(!iconcache.contains(fi.absoluteFilePath()))
{
iconcache.insert(fi.absoluteFilePath(), FilesDefs::getPixmapFromQtResourcePath(fi.absoluteFilePath()).scaled(buttonWidth, buttonHeight, Qt::KeepAspectRatio));
iconcache.insert(fi.absoluteFilePath(), FilesDefs::getPixmapFromQtResourcePath(fi.absoluteFilePath()).scaled(buttonWidth, buttonHeight, Qt::KeepAspectRatio));
}
button->setIcon(iconcache[fi.absoluteFilePath()]);
button->setToolTip(fi.fileName());