...
 
Commits (1)
......@@ -85,11 +85,13 @@ KisWelcomePageWidget::KisWelcomePageWidget(QWidget *parent)
connect(chkShowNews, SIGNAL(toggled(bool)), newsWidget, SLOT(toggleNews(bool)));
connect(chkShowNews, SIGNAL(toggled(bool)), this, SLOT(slotShowNewsUI()));
// configure the News area
KisConfig cfg(true);
bool m_getNews = cfg.readEntry<bool>("FetchNews", false);
chkShowNews->setChecked(m_getNews);
slotShowNewsUI();
setAcceptDrops(true);
......@@ -138,6 +140,12 @@ void KisWelcomePageWidget::showDropAreaIndicator(bool show)
}
}
void KisWelcomePageWidget::slotShowNewsUI()
{
newTitleLabel->setVisible(chkShowNews->isChecked());
newsWidget->setVisible(chkShowNews->isChecked());
}
void KisWelcomePageWidget::slotUpdateThemeColors()
{
......
......@@ -50,6 +50,10 @@ public Q_SLOTS:
/// have a preview, an icon is used that needs to be updated
void populateRecentDocuments();
/// if we are not showing the news on the welcome, hide the entire 3rd column
/// since it takes up the entire 3rd column
void slotShowNewsUI();
protected:
// QWidget overrides
......
......@@ -67,6 +67,25 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkShowNews">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Show news about Krita: this needs internet to retrieve information from the krita.org website</string>
</property>
<property name="text">
<string>Enable News</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
......@@ -706,7 +725,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="QLabel" name="helpTitleLabel_2">
<widget class="QLabel" name="newTitleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
......@@ -726,25 +745,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkShowNews">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Show news about Krita: this needs internet to retrieve information from the krita.org website</string>
</property>
<property name="text">
<string>Enabled</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
......