Merge pull request #11785 from shuffle2/qtnext3

DolphinQt: cache icons instead of single pixmaps
This commit is contained in:
Admiral H. Curtiss
2023-04-29 17:32:29 +02:00
committed by GitHub
15 changed files with 94 additions and 218 deletions

View File

@ -126,11 +126,11 @@ void BreakpointWidget::CreateWidgets()
void BreakpointWidget::UpdateIcons()
{
m_new->setIcon(Resources::GetScaledThemeIcon("debugger_add_breakpoint"));
m_delete->setIcon(Resources::GetScaledThemeIcon("debugger_delete"));
m_clear->setIcon(Resources::GetScaledThemeIcon("debugger_clear"));
m_load->setIcon(Resources::GetScaledThemeIcon("debugger_load"));
m_save->setIcon(Resources::GetScaledThemeIcon("debugger_save"));
m_new->setIcon(Resources::GetThemeIcon("debugger_add_breakpoint"));
m_delete->setIcon(Resources::GetThemeIcon("debugger_delete"));
m_clear->setIcon(Resources::GetThemeIcon("debugger_clear"));
m_load->setIcon(Resources::GetThemeIcon("debugger_load"));
m_save->setIcon(Resources::GetThemeIcon("debugger_save"));
}
void BreakpointWidget::closeEvent(QCloseEvent*)

View File

@ -379,8 +379,7 @@ void CodeViewWidget::Update(const Core::CPUThreadGuard* guard)
if (debug_interface.IsBreakpoint(addr))
{
auto icon =
Resources::GetScaledThemeIcon("debugger_breakpoint").pixmap(QSize(rowh - 2, rowh - 2));
auto icon = Resources::GetThemeIcon("debugger_breakpoint").pixmap(QSize(rowh - 2, rowh - 2));
if (!m_system.GetPowerPC().GetBreakPoints().IsBreakPointEnable(addr))
{
QPixmap disabled_icon(icon.size());

View File

@ -583,7 +583,7 @@ void MemoryViewWidget::UpdateBreakpointTags()
{
m_table->item(i, 0)->setData(
Qt::DecorationRole,
Resources::GetScaledThemeIcon("debugger_breakpoint")
Resources::GetThemeIcon("debugger_breakpoint")
.pixmap(QSize(m_table->rowHeight(0) - 3, m_table->rowHeight(0) - 3)));
}
else

View File

@ -131,11 +131,11 @@ void WatchWidget::ConnectWidgets()
void WatchWidget::UpdateIcons()
{
// TODO: Create a "debugger_add_watch" icon
m_new->setIcon(Resources::GetScaledThemeIcon("debugger_add_breakpoint"));
m_delete->setIcon(Resources::GetScaledThemeIcon("debugger_delete"));
m_clear->setIcon(Resources::GetScaledThemeIcon("debugger_clear"));
m_load->setIcon(Resources::GetScaledThemeIcon("debugger_load"));
m_save->setIcon(Resources::GetScaledThemeIcon("debugger_save"));
m_new->setIcon(Resources::GetThemeIcon("debugger_add_breakpoint"));
m_delete->setIcon(Resources::GetThemeIcon("debugger_delete"));
m_clear->setIcon(Resources::GetThemeIcon("debugger_clear"));
m_load->setIcon(Resources::GetThemeIcon("debugger_load"));
m_save->setIcon(Resources::GetThemeIcon("debugger_save"));
}
void WatchWidget::UpdateButtonsEnabled()