Support icons in SettingsDialog tabs

This commit is contained in:
Martchus 2016-08-31 23:38:35 +02:00
parent 7f9afcda73
commit 58fad82c3b
5 changed files with 16 additions and 0 deletions

View File

@ -96,6 +96,9 @@ set(REQUIRED_ICONS
system-run
go-next
qtcreator
system-search
preferences-desktop-icons
preferences-desktop-locale
)
# meta data

View File

@ -5,6 +5,10 @@
<property name="windowTitle">
<string>Appearance</string>
</property>
<property name="windowIcon">
<iconset theme="preferences-desktop-icons">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="styleSheet">
<string notr="true">QGroupBox { font-weight: bold };</string>
</property>

View File

@ -13,6 +13,9 @@
<property name="windowTitle">
<string>Environment/paths</string>
</property>
<property name="windowIcon">
<iconset theme="system-search"/>
</property>
<property name="styleSheet">
<string notr="true">QGroupBox { font-weight: bold };</string>
</property>

View File

@ -5,6 +5,10 @@
<property name="windowTitle">
<string>Localization</string>
</property>
<property name="windowIcon">
<iconset theme="preferences-desktop-locale">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="styleSheet">
<string notr="true">QGroupBox { font-weight: bold };</string>
</property>

View File

@ -176,6 +176,7 @@ void SettingsDialog::updateTabWidget()
scrollArea = qobject_cast<QScrollArea *>(m_ui->pagesTabWidget->widget(index));
scrollArea->takeWidget();
m_ui->pagesTabWidget->setTabText(index, page->widget()->windowTitle());
m_ui->pagesTabWidget->setTabIcon(index, page->widget()->windowIcon());
} else {
scrollArea = new QScrollArea(m_ui->pagesTabWidget);
scrollArea->setFrameStyle(QFrame::NoFrame);
@ -183,6 +184,7 @@ void SettingsDialog::updateTabWidget()
scrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
scrollArea->setWidgetResizable(true);
m_ui->pagesTabWidget->addTab(scrollArea, page->widget()->windowTitle());
m_ui->pagesTabWidget->setTabIcon(index, page->widget()->windowIcon());
}
if(page->widget()->layout()) {
page->widget()->layout()->setAlignment(Qt::AlignTop | Qt::AlignLeft);