Skip to content

Commit

Permalink
suggested style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yiding committed Mar 13, 2019
1 parent 0a7bd9f commit 6897907
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/libs/browser/webview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
using namespace Zeal::Browser;

WebView::WebView(QWidget *parent)
: QWebView(parent), m_zoomLevel(0)
: QWebView(parent)
{
page()->setNetworkAccessManager(Core::Application::instance()->networkManager());
// Applies any DPI based scaling.
Expand All @@ -63,7 +63,7 @@ void WebView::setZoomLevel(int level)
m_zoomLevel = level;

// Scale the webview relative to the DPI of the screen.
qreal dpiZoomFactor = logicalDpiY() / 96.0;
const float dpiZoomFactor = logicalDpiY() / 96.0;

setZoomFactor(availableZoomLevels().at(level) / 100.0 * dpiZoomFactor);
emit zoomLevelChanged();
Expand Down
2 changes: 1 addition & 1 deletion src/libs/browser/webview.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public slots:

QMenu *m_contextMenu = nullptr;
QUrl m_clickedLink;
int m_zoomLevel;
int m_zoomLevel = 0;
};

} // namespace Browser
Expand Down

0 comments on commit 6897907

Please sign in to comment.