Support icons in SettingsDialog tabs
This commit is contained in:
parent
7f9afcda73
commit
58fad82c3b
|
@ -96,6 +96,9 @@ set(REQUIRED_ICONS
|
|||
system-run
|
||||
go-next
|
||||
qtcreator
|
||||
system-search
|
||||
preferences-desktop-icons
|
||||
preferences-desktop-locale
|
||||
)
|
||||
|
||||
# meta data
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue