Support icons in SettingsDialog tabs
This commit is contained in:
parent
7f9afcda73
commit
58fad82c3b
|
@ -96,6 +96,9 @@ set(REQUIRED_ICONS
|
||||||
system-run
|
system-run
|
||||||
go-next
|
go-next
|
||||||
qtcreator
|
qtcreator
|
||||||
|
system-search
|
||||||
|
preferences-desktop-icons
|
||||||
|
preferences-desktop-locale
|
||||||
)
|
)
|
||||||
|
|
||||||
# meta data
|
# meta data
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Appearance</string>
|
<string>Appearance</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset theme="preferences-desktop-icons">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Environment/paths</string>
|
<string>Environment/paths</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset theme="system-search"/>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Localization</string>
|
<string>Localization</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset theme="preferences-desktop-locale">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QGroupBox { font-weight: bold };</string>
|
<string notr="true">QGroupBox { font-weight: bold };</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -176,6 +176,7 @@ void SettingsDialog::updateTabWidget()
|
||||||
scrollArea = qobject_cast<QScrollArea *>(m_ui->pagesTabWidget->widget(index));
|
scrollArea = qobject_cast<QScrollArea *>(m_ui->pagesTabWidget->widget(index));
|
||||||
scrollArea->takeWidget();
|
scrollArea->takeWidget();
|
||||||
m_ui->pagesTabWidget->setTabText(index, page->widget()->windowTitle());
|
m_ui->pagesTabWidget->setTabText(index, page->widget()->windowTitle());
|
||||||
|
m_ui->pagesTabWidget->setTabIcon(index, page->widget()->windowIcon());
|
||||||
} else {
|
} else {
|
||||||
scrollArea = new QScrollArea(m_ui->pagesTabWidget);
|
scrollArea = new QScrollArea(m_ui->pagesTabWidget);
|
||||||
scrollArea->setFrameStyle(QFrame::NoFrame);
|
scrollArea->setFrameStyle(QFrame::NoFrame);
|
||||||
|
@ -183,6 +184,7 @@ void SettingsDialog::updateTabWidget()
|
||||||
scrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
scrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
scrollArea->setWidgetResizable(true);
|
scrollArea->setWidgetResizable(true);
|
||||||
m_ui->pagesTabWidget->addTab(scrollArea, page->widget()->windowTitle());
|
m_ui->pagesTabWidget->addTab(scrollArea, page->widget()->windowTitle());
|
||||||
|
m_ui->pagesTabWidget->setTabIcon(index, page->widget()->windowIcon());
|
||||||
}
|
}
|
||||||
if(page->widget()->layout()) {
|
if(page->widget()->layout()) {
|
||||||
page->widget()->layout()->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
page->widget()->layout()->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
||||||
|
|
Loading…
Reference in New Issue