diff options
author | saturneric <[email protected]> | 2024-12-20 19:44:31 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-20 19:44:31 +0000 |
commit | ee3491860f86c65e6af1bc3549e6228c053e34f3 (patch) | |
tree | 8229a918f7ca8f0360bc3df402cbfc763e662a8b /src/ui/model/GpgKeyTableProxyModel.h | |
parent | fix: try to add all platform plugins for AppImage (diff) | |
download | GpgFrontend-ee3491860f86c65e6af1bc3549e6228c053e34f3.tar.gz GpgFrontend-ee3491860f86c65e6af1bc3549e6228c053e34f3.zip |
fix: adjust the width of key list cell correctly
Diffstat (limited to '')
-rw-r--r-- | src/ui/model/GpgKeyTableProxyModel.h (renamed from src/core/model/GpgKeyTableProxyModel.h) | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/model/GpgKeyTableProxyModel.h b/src/ui/model/GpgKeyTableProxyModel.h index 573d938b..ffca5a6f 100644 --- a/src/core/model/GpgKeyTableProxyModel.h +++ b/src/ui/model/GpgKeyTableProxyModel.h @@ -28,7 +28,8 @@ #pragma once -#include <utility> +#include <QFont> +#include <QFontMetrics> #include "core/model/GpgKeyTableModel.h" @@ -49,6 +50,12 @@ class GPGFRONTEND_CORE_EXPORT GpgKeyTableProxyModel void ResetGpgKeyTableModel(QSharedPointer<GpgKeyTableModel> model); + [[nodiscard]] auto data(const QModelIndex &index, + int role) const -> QVariant override; + + [[nodiscard]] auto headerData(int section, Qt::Orientation orientation, + int role) const -> QVariant override; + protected: [[nodiscard]] auto filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent) const -> bool override; @@ -97,6 +104,9 @@ class GPGFRONTEND_CORE_EXPORT GpgKeyTableProxyModel QString filter_keywords_; QList<QString> favorite_key_ids_; KeyFilter custom_filter_; + + QFont default_font_; + QFontMetrics default_metrics_; }; } // namespace GpgFrontend
\ No newline at end of file |