aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ResourcePackFolderModel.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-24 20:15:34 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-24 20:15:34 -0700
commit086a7e19f099c6c9b9529afb2360300e534876bf (patch)
tree1ab5d7313e406ef8e07091a528792d17fbc7149f /launcher/minecraft/mod/ResourcePackFolderModel.cpp
parent74e7c13a177afdb503a642cb9c97d71e72249291 (diff)
downloadPrismLauncher-086a7e19f099c6c9b9529afb2360300e534876bf.tar.gz
PrismLauncher-086a7e19f099c6c9b9529afb2360300e534876bf.tar.bz2
PrismLauncher-086a7e19f099c6c9b9529afb2360300e534876bf.zip
feat: Column on left, hideable
- columns are hideable (saves to settings) - image column moved to left - datamodals can provide resize modes Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod/ResourcePackFolderModel.cpp')
-rw-r--r--launcher/minecraft/mod/ResourcePackFolderModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/launcher/minecraft/mod/ResourcePackFolderModel.cpp b/launcher/minecraft/mod/ResourcePackFolderModel.cpp
index b11e2262..7ec5668c 100644
--- a/launcher/minecraft/mod/ResourcePackFolderModel.cpp
+++ b/launcher/minecraft/mod/ResourcePackFolderModel.cpp
@@ -50,7 +50,9 @@
ResourcePackFolderModel::ResourcePackFolderModel(const QString& dir, std::shared_ptr<const BaseInstance> instance)
: ResourceFolderModel(QDir(dir), instance)
{
- m_column_sort_keys = { SortType::ENABLED, SortType::NAME, SortType::PACK_FORMAT, SortType::DATE, SortType::NAME };
+ m_column_sort_keys = { SortType::ENABLED, SortType::NAME, SortType::NAME, SortType::PACK_FORMAT, SortType::DATE};
+ m_column_resize_modes = { QHeaderView::ResizeToContents, QHeaderView::ResizeToContents, QHeaderView::Stretch, QHeaderView::ResizeToContents};
+
}
QVariant ResourcePackFolderModel::data(const QModelIndex& index, int role) const
@@ -130,7 +132,7 @@ QVariant ResourcePackFolderModel::headerData(int section, Qt::Orientation orient
case Qt::DisplayRole:
switch (section) {
case ActiveColumn:
- return QString();
+ return tr("Enable");
case NameColumn:
return tr("Name");
case PackFormatColumn: