summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.h
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2022-03-21 14:06:39 +0200
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2022-03-24 05:59:08 +0000
commite40041978e7b42e17bc5264def255f71090160b4 (patch)
tree7cee5f3de6484ab28f2644ce48299488e21a21b4 /src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.h
parentbd607909a514ac17a5d0e41ee664bf61494783b5 (diff)
downloadqt-creator-e40041978e7b42e17bc5264def255f71090160b4.tar.gz
QmlDesigner: Fix font preview tooltip image
The preview tooltip was recently reduced in size, but font previews were still being rendered the old size and scaled down, degrading image quality. The new default size is bit too small to render the sample text of fonts nicely, so added an option to set unscaled image to the tooltip, allowing us to use twice as wide preview images for fonts. Fixes: QDS-6486 Change-Id: Ieaabfbea11e47509de7cd6aed93464d8595ea541 Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.h')
-rw-r--r--src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.h b/src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.h
index 2b87359e07..e964766f95 100644
--- a/src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.h
+++ b/src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.h
@@ -47,9 +47,7 @@ class AssetsLibraryModel : public QAbstractListModel
Q_PROPERTY(bool isEmpty READ isEmpty WRITE setIsEmpty NOTIFY isEmptyChanged)
public:
- AssetsLibraryModel(QmlDesigner::SynchronousImageCache &fontImageCache,
- Utils::FileSystemWatcher *fileSystemWatcher,
- QObject *parent = nullptr);
+ AssetsLibraryModel(Utils::FileSystemWatcher *fileSystemWatcher, QObject *parent = nullptr);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
@@ -97,7 +95,6 @@ private:
void setIsEmpty(bool empty);
- SynchronousImageCache &m_fontImageCache;
QHash<QString, QPair<QDateTime, QIcon>> m_iconCache;
QString m_searchText;