Commit d9b667ab authored by Scott Petrovic's avatar Scott Petrovic

add a clear button for the background image in general settings to go back to color

parent 7e32f090
......@@ -112,7 +112,9 @@ GeneralTab::GeneralTab(QWidget *_parent, const char *_name)
m_favoritePresetsSpinBox->setValue(cfg.favoritePresets());
m_mdiColor->setColor(cfg.getMDIBackgroundColor());
m_backgroundimage->setText(cfg.getMDIBackgroundImage());
connect(m_bnFileName, SIGNAL(clicked()), SLOT(getBackgroundImage()));
connect(clearBgImageButton, SIGNAL(clicked()), SLOT(clearBackgroundImage()));
}
void GeneralTab::setDefault()
......@@ -188,6 +190,11 @@ void GeneralTab::getBackgroundImage()
}
void GeneralTab::clearBackgroundImage()
{
// clearing the background image text will implicitly make the background color be used
m_backgroundimage->setText("");
}
ColorSettingsTab::ColorSettingsTab(QWidget *parent, const char *name)
: QWidget(parent)
......
......@@ -73,6 +73,7 @@ public:
int favoritePresets();
private slots:
void getBackgroundImage();
void clearBackgroundImage();
};
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>533</width>
<width>628</width>
<height>375</height>
</rect>
</property>
......@@ -191,7 +191,7 @@
</widget>
</item>
<item row="9" column="1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0">
<item>
<widget class="QLabel" name="m_backgroundimage">
<property name="minimumSize">
......@@ -200,6 +200,12 @@
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="text">
<string/>
</property>
......@@ -212,28 +218,41 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearBgImageButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="10" column="0">
<item row="11" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Window Background:</string>
</property>
</widget>
</item>
<item row="10" column="1">
<item row="11" column="1">
<widget class="KColorButton" name="m_mdiColor">
<property name="text">
<string/>
</property>
<property name="color">
<property name="color" stdset="0">
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
<property name="defaultColor">
<property name="defaultColor" stdset="0">
<color>
<red>0</red>
<green>0</green>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment