Skip to content

Commit

Permalink
Merge pull request #1 from attah/fix
Browse files Browse the repository at this point in the history
Use new WebView
  • Loading branch information
poetaster authored Mar 24, 2022
2 parents 32a03ad + cc04362 commit cc8528b
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions qml/components/WebAuth.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
//import QtWebKit.experimental 1.0
import Sailfish.WebView 1.0
import Sailfish.WebEngine 1.0

Page {
id: webAuth
Expand All @@ -26,7 +27,7 @@ Page {
}
}*/

SilicaWebView {
WebView {
id: webView

y: pHeader.height + Theme.paddingLarge
Expand All @@ -36,22 +37,6 @@ Page {
//experimental.preferences.developerExtrasEnabled: true
//experimental.preferences.navigatorQtObjectEnabled: true

Component.onCompleted: {
webAuth.scale = scale
}

// copied from webcat to get scaling of Spotify authentication html
// usable on phone screen
property variant devicePixelRatio: {//1.5
if (Screen.width <= 540) return 1.5;
else if (Screen.width > 540 && Screen.width <= 768) return 2.0;
else if (Screen.width > 768) return 3.0;
}
experimental.customLayoutWidth: width / devicePixelRatio
experimental.deviceWidth: width / devicePixelRatio
experimental.overview: true
experimental.userScripts: [
Qt.resolvedUrl("DevicePixelRatioHack.js")
]
}
}

0 comments on commit cc8528b

Please sign in to comment.