Commit 85205e63 authored by Andrea Diamantini's avatar Andrea Diamantini
Browse files

Fix and improve save zoom feature, loading it on start

This seems to work also with problem described in bug #295446

BUG: 277599
BUG: 296447
CCBUG: 295446
parent 885511e9
......@@ -449,21 +449,22 @@ void WebPage::loadStarted()
{
_hasAdBlockedElements = false;
rApp->adblockManager()->clearElementsLists();
}
void WebPage::loadFinished(bool ok)
{
Q_UNUSED(ok);
// set zoom factor
QString val;
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group(config, "Zoom");
val = group.readEntry(_loadingUrl.host(), QString("10"));
int value = val.toInt();
mainFrame()->setZoomFactor(QVariant(value).toReal() / 10); // Don't allox max +1 values
if (value != 10)
mainFrame()->setZoomFactor(QVariant(value).toReal() / 10); // Don't allox max +1 values
}
void WebPage::loadFinished(bool ok)
{
Q_UNUSED(ok);
// Provide site icon. Can this be moved to loadStarted??
rApp->iconManager()->provideIcon(mainFrame(), _loadingUrl);
......
Supports Markdown
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