Preferences had icon embeddeed in the ui
This commit is contained in:
@@ -17,7 +17,21 @@ preferencesDialog::preferencesDialog(QWidget *parent) :
|
|||||||
updateLock(false)
|
updateLock(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
QSettings settings("companion", "companion");
|
||||||
|
int theme_set=settings.value("theme", 1).toInt();
|
||||||
|
QIcon Icon;
|
||||||
|
|
||||||
|
QString Theme;
|
||||||
|
switch(theme_set) {
|
||||||
|
case 0:
|
||||||
|
Theme="classic";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Theme="monochrome";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Icon.addPixmap(":/themes/"+Theme+"/preferences.png");
|
||||||
|
this->setWindowIcon(Icon);
|
||||||
|
|
||||||
QCheckBox * OptionCheckBox[]= {
|
QCheckBox * OptionCheckBox[]= {
|
||||||
ui->optionCheckBox_1, ui->optionCheckBox_2, ui->optionCheckBox_3, ui->optionCheckBox_4, ui->optionCheckBox_5, ui->optionCheckBox_6, ui->optionCheckBox_7,
|
ui->optionCheckBox_1, ui->optionCheckBox_2, ui->optionCheckBox_3, ui->optionCheckBox_4, ui->optionCheckBox_5, ui->optionCheckBox_6, ui->optionCheckBox_7,
|
||||||
|
|||||||
@@ -25,10 +25,6 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Preferences</string>
|
<string>Preferences</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>:/images/preferences.png</normaloff>:/images/preferences.png</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0,0,1,0">
|
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0,0,1,0">
|
||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
<enum>QLayout::SetMinimumSize</enum>
|
<enum>QLayout::SetMinimumSize</enum>
|
||||||
|
|||||||
Reference in New Issue
Block a user