mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 12:45:46 +00:00
Qt: Fix how Icons are assigned in Settings Window.
This commit is contained in:
parent
a2d2acf741
commit
e8a214ad14
@ -68,8 +68,9 @@ void SettingsWindow::MakeUnfinishedWarning()
|
|||||||
|
|
||||||
void SettingsWindow::AddCategoryToList(const QString& title, const QString& icon)
|
void SettingsWindow::AddCategoryToList(const QString& title, const QString& icon)
|
||||||
{
|
{
|
||||||
|
QString dir = Settings().GetThemeDir();
|
||||||
QListWidgetItem* button = new QListWidgetItem();
|
QListWidgetItem* button = new QListWidgetItem();
|
||||||
button->setIcon(QIcon(icon));
|
button->setIcon(QIcon(dir.append(icon)));
|
||||||
button->setText(title);
|
button->setText(title);
|
||||||
button->setTextAlignment(Qt::AlignVCenter);
|
button->setTextAlignment(Qt::AlignVCenter);
|
||||||
button->setSizeHint(QSize(28, 28));
|
button->setSizeHint(QSize(28, 28));
|
||||||
@ -79,17 +80,14 @@ void SettingsWindow::AddCategoryToList(const QString& title, const QString& icon
|
|||||||
|
|
||||||
void SettingsWindow::MakeCategoryList()
|
void SettingsWindow::MakeCategoryList()
|
||||||
{
|
{
|
||||||
QString dir = Settings().GetThemeDir();
|
|
||||||
|
|
||||||
m_categories = new QListWidget;
|
m_categories = new QListWidget;
|
||||||
m_categories->setMaximumWidth(175);
|
m_categories->setMaximumWidth(175);
|
||||||
m_categories->setIconSize(QSize(32, 32));
|
m_categories->setIconSize(QSize(32, 32));
|
||||||
m_categories->setMovement(QListView::Static);
|
m_categories->setMovement(QListView::Static);
|
||||||
m_categories->setSpacing(0);
|
m_categories->setSpacing(0);
|
||||||
|
|
||||||
AddCategoryToList(tr("General"), dir.append(QStringLiteral("config.png")));
|
AddCategoryToList(tr("General"), QStringLiteral("config.png"));
|
||||||
AddCategoryToList(tr("Interface"), dir.append(QStringLiteral("config.png")));
|
AddCategoryToList(tr("Interface"), QStringLiteral("browse.png"));
|
||||||
|
|
||||||
connect(m_categories, &QListWidget::currentItemChanged, this, &SettingsWindow::changePage);
|
connect(m_categories, &QListWidget::currentItemChanged, this, &SettingsWindow::changePage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,12 +95,18 @@
|
|||||||
<Filter>Settings</Filter>
|
<Filter>Settings</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="$(QtMocOutPrefix)GeneralPane.cpp">
|
<ClCompile Include="$(QtMocOutPrefix)GeneralPane.cpp">
|
||||||
<ClCompile Include="Settings/InterfacePane.cpp">
|
<Filter>Generated Files</Filter>
|
||||||
<Filter>Settings</Filter>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="$(QtMocOutPrefix)InterfacePane.cpp">
|
<ClCompile Include="$(QtMocOutPrefix)InterfacePane.cpp">
|
||||||
<Filter>Generated Files</Filter>
|
<Filter>Generated Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Config\ControllersWindow.cpp" />
|
||||||
|
<ClCompile Include="$(QtMocOutPrefix)ControllersWindow.cpp">
|
||||||
|
<Filter>Generated Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Settings\InterfacePane.cpp">
|
||||||
|
<Filter>Settings</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="MainWindow.h" />
|
<QtMoc Include="MainWindow.h" />
|
||||||
@ -134,10 +140,13 @@
|
|||||||
<QtMoc Include="Config\FilesystemWidget.h" />
|
<QtMoc Include="Config\FilesystemWidget.h" />
|
||||||
<QtMoc Include="Config\InfoWidget.h" />
|
<QtMoc Include="Config\InfoWidget.h" />
|
||||||
<QtMoc Include="InDevelopmentWarning.h" />
|
<QtMoc Include="InDevelopmentWarning.h" />
|
||||||
<QtMoc Include="Settings\GeneralPane.h">
|
<QtMoc Include="Config\ControllersWindow.h" />
|
||||||
<QtMoc Include="Settings\InterfacePane.h">
|
<QtMoc Include="Settings\InterfacePane.h">
|
||||||
<Filter>Settings</Filter>
|
<Filter>Settings</Filter>
|
||||||
</QtMoc>
|
</QtMoc>
|
||||||
|
<QtMoc Include="Settings\GeneralPane.h">
|
||||||
|
<Filter>Settings</Filter>
|
||||||
|
</QtMoc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtUi Include="*.ui" />
|
<QtUi Include="*.ui" />
|
||||||
@ -165,4 +174,4 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Resources.h" />
|
<ClInclude Include="Resources.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
x
Reference in New Issue
Block a user