mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
DolphinQt: cache icons instead of single pixmaps
Fixes dynamically changing dpi scaling. Load resources from svg if possible. Currently svg support is not in Qt build in Externals, and image files need to be added later.
This commit is contained in:
@ -90,12 +90,12 @@ void FilesystemWidget::ConnectWidgets()
|
||||
void FilesystemWidget::PopulateView()
|
||||
{
|
||||
// Cache these two icons, the tree will use them a lot.
|
||||
m_folder_icon = Resources::GetScaledIcon("isoproperties_folder");
|
||||
m_file_icon = Resources::GetScaledIcon("isoproperties_file");
|
||||
m_folder_icon = Resources::GetResourceIcon("isoproperties_folder");
|
||||
m_file_icon = Resources::GetResourceIcon("isoproperties_file");
|
||||
|
||||
auto* disc = new QStandardItem(tr("Disc"));
|
||||
disc->setEditable(false);
|
||||
disc->setIcon(Resources::GetScaledIcon("isoproperties_disc"));
|
||||
disc->setIcon(Resources::GetResourceIcon("isoproperties_disc"));
|
||||
disc->setData(QVariant::fromValue(EntryType::Disc), ENTRY_TYPE);
|
||||
m_tree_model->appendRow(disc);
|
||||
m_tree_view->expand(disc->index());
|
||||
@ -107,7 +107,7 @@ void FilesystemWidget::PopulateView()
|
||||
auto* item = new QStandardItem;
|
||||
item->setEditable(false);
|
||||
|
||||
item->setIcon(Resources::GetScaledIcon("isoproperties_disc"));
|
||||
item->setIcon(Resources::GetResourceIcon("isoproperties_disc"));
|
||||
item->setData(static_cast<qlonglong>(i), ENTRY_PARTITION);
|
||||
item->setData(QVariant::fromValue(EntryType::Partition), ENTRY_TYPE);
|
||||
|
||||
|
Reference in New Issue
Block a user