summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-06-06 19:08:34 +0200
committerAndrea Diamantini <adjam7@gmail.com>2013-06-06 19:08:34 +0200
commita2da33f58ce64633dc182009b68ddb51b5581569 (patch)
treeb81d04404dc2997fecbcb240c00da424c99c56b5 /src/webtab
parentGet sure JS is properly detected and executed (diff)
downloadrekonq-a2da33f58ce64633dc182009b68ddb51b5581569.tar.xz
Remember to save zoom settings on change
BUG:223188
Diffstat (limited to 'src/webtab')
-rw-r--r--src/webtab/webtab.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/webtab/webtab.cpp b/src/webtab/webtab.cpp
index d593fe5b..7743677c 100644
--- a/src/webtab/webtab.cpp
+++ b/src/webtab/webtab.cpp
@@ -434,6 +434,11 @@ void WebTab::zoomIn()
view()->setZoomFactor(QVariant(m_zoomFactor).toReal() / 10);
+ // set zoom factor
+ KSharedConfig::Ptr config = KGlobal::config();
+ KConfigGroup group(config, "Zoom");
+ group.writeEntry(url().host(), m_zoomFactor);
+
emit infoToShow(i18n("Zooming: ") + QString::number(m_zoomFactor * 10) + QL1S("%"));
}
@@ -449,6 +454,11 @@ void WebTab::zoomOut()
m_zoomFactor--;
view()->setZoomFactor(QVariant(m_zoomFactor).toReal() / 10);
+ // set zoom factor
+ KSharedConfig::Ptr config = KGlobal::config();
+ KConfigGroup group(config, "Zoom");
+ group.writeEntry(url().host(), m_zoomFactor);
+
emit infoToShow(i18n("Zooming: ") + QString::number(m_zoomFactor * 10) + QL1S("%"));
}
@@ -458,6 +468,11 @@ void WebTab::zoomDefault()
m_zoomFactor = 10;
view()->setZoomFactor(QVariant(m_zoomFactor).toReal() / 10);
+ // set zoom factor
+ KSharedConfig::Ptr config = KGlobal::config();
+ KConfigGroup group(config, "Zoom");
+ group.writeEntry(url().host(), m_zoomFactor);
+
emit infoToShow(i18n("Default zoom: ") + QString::number(m_zoomFactor * 10) + QL1S("%"));
}