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)
|
||||
{
|
||||
QString dir = Settings().GetThemeDir();
|
||||
QListWidgetItem* button = new QListWidgetItem();
|
||||
button->setIcon(QIcon(icon));
|
||||
button->setIcon(QIcon(dir.append(icon)));
|
||||
button->setText(title);
|
||||
button->setTextAlignment(Qt::AlignVCenter);
|
||||
button->setSizeHint(QSize(28, 28));
|
||||
|
@ -79,17 +80,14 @@ void SettingsWindow::AddCategoryToList(const QString& title, const QString& icon
|
|||
|
||||
void SettingsWindow::MakeCategoryList()
|
||||
{
|
||||
QString dir = Settings().GetThemeDir();
|
||||
|
||||
m_categories = new QListWidget;
|
||||
m_categories->setMaximumWidth(175);
|
||||
m_categories->setIconSize(QSize(32, 32));
|
||||
m_categories->setMovement(QListView::Static);
|
||||
m_categories->setSpacing(0);
|
||||
|
||||
AddCategoryToList(tr("General"), dir.append(QStringLiteral("config.png")));
|
||||
AddCategoryToList(tr("Interface"), dir.append(QStringLiteral("config.png")));
|
||||
|
||||
AddCategoryToList(tr("General"), QStringLiteral("config.png"));
|
||||
AddCategoryToList(tr("Interface"), QStringLiteral("browse.png"));
|
||||
connect(m_categories, &QListWidget::currentItemChanged, this, &SettingsWindow::changePage);
|
||||
}
|
||||
|
||||
|
|
|
@ -95,12 +95,18 @@
|
|||
<Filter>Settings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(QtMocOutPrefix)GeneralPane.cpp">
|
||||
<ClCompile Include="Settings/InterfacePane.cpp">
|
||||
<Filter>Settings</Filter>
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(QtMocOutPrefix)InterfacePane.cpp">
|
||||
<Filter>Generated Files</Filter>
|
||||
</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>
|
||||
<QtMoc Include="MainWindow.h" />
|
||||
|
@ -134,10 +140,13 @@
|
|||
<QtMoc Include="Config\FilesystemWidget.h" />
|
||||
<QtMoc Include="Config\InfoWidget.h" />
|
||||
<QtMoc Include="InDevelopmentWarning.h" />
|
||||
<QtMoc Include="Settings\GeneralPane.h">
|
||||
<QtMoc Include="Config\ControllersWindow.h" />
|
||||
<QtMoc Include="Settings\InterfacePane.h">
|
||||
<Filter>Settings</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Settings\GeneralPane.h">
|
||||
<Filter>Settings</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUi Include="*.ui" />
|
||||
|
@ -165,4 +174,4 @@
|
|||
<ItemGroup>
|
||||
<ClInclude Include="Resources.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
Loading…
Reference in New Issue