Skip to content

Commit

Permalink
Special build for plasma 5.19+
Browse files Browse the repository at this point in the history
Remove the Webkit dependancy, and remove a few features, are they will not work anymore.
  • Loading branch information
Cqoicebordel committed Jun 21, 2020
1 parent dc0f6ec commit 1273c96
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
4 changes: 2 additions & 2 deletions cqcb.plasma.webslice/contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<default>3600</default>
</entry>
<entry name="enableTransparency" type="Bool">
<default>true</default>
<default>false</default>
</entry>
<entry name="displaySiteBehaviour" type="Bool">
<default>true</default>
Expand All @@ -31,7 +31,7 @@
<default>500</default>
</entry>
<entry name="reloadAnimation" type="Bool">
<default>true</default>
<default>false</default>
</entry>
</group>
<group name="Advanced">
Expand Down
4 changes: 4 additions & 0 deletions cqcb.plasma.webslice/contents/ui/ConfigAdvanced.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Item {

Label {
text: i18n('Minimum Content width :')
enabled:false
}

SpinBox {
Expand All @@ -56,19 +57,22 @@ Item {
minimumValue: 1
maximumValue: 10000
Layout.columnSpan: 1
enabled:false
}

Label {
font.italic: true
text: i18n('(default : 100px)')
Layout.columnSpan: 1
enabled:false
}

Label {
font.italic: true
text: i18n('This option can help you trigger media queries, and may help with zoom.')
Layout.preferredWidth: 0
Layout.columnSpan: 3
enabled:false
}

Item {
Expand Down
3 changes: 3 additions & 0 deletions cqcb.plasma.webslice/contents/ui/ConfigGeneral.qml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ Item {
id: enableTransparency
Layout.columnSpan: 3
text: i18n('Enable transparency')
enabled:false
}

Label {
font.italic: true
text: i18n('Note that the transparency will only work if the page background is also transparent or not set.\nAlso, the transparency may not be visible until the page is reloaded or repainted.')
Layout.columnSpan: 3
enabled:false
}

Item {
Expand Down Expand Up @@ -167,6 +169,7 @@ Item {
id: reloadAnimation
Layout.columnSpan: 3
text: i18n('Display reload animation')
enabled:false
}
}
}
3 changes: 3 additions & 0 deletions cqcb.plasma.webslice/contents/ui/ConfigMultipleURLs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Item {

Label {
text: i18n('List of URL accessible throught the context menu to switch to others websites.')
enabled:false
}

TableView {
Expand All @@ -34,10 +35,12 @@ Item {
title: i18n('URL')
}
height:300
enabled:false
}


RowLayout {
enabled:false
TextField {
id: addedUrl
placeholderText: i18n('URL')
Expand Down
20 changes: 11 additions & 9 deletions cqcb.plasma.webslice/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
***************************************************************************/

import QtQuick 2.7
import QtWebKit 3.0
import QtWebView 1.1
//import QtWebEngine 1.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.3
import QtWebKit.experimental 1.0
//import QtWebKit.experimental 1.0
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.core 2.0 as PlasmaCore
Expand Down Expand Up @@ -81,8 +81,8 @@ Item {
id: webviewID
url: websliceUrl
anchors.fill: parent
experimental.preferredMinimumContentsWidth: minimumContentWidth
experimental.transparentBackground: enableTransparency
//experimental.preferredMinimumContentsWidth: minimumContentWidth
//experimental.transparentBackground: enableTransparency

width: (displaySiteBehaviour) ? 0 : webPopupWidth
height: (displaySiteBehaviour) ? 0 : webPopupHeight
Expand Down Expand Up @@ -117,11 +117,13 @@ Item {
*/
onLoadingChanged: {
if (enableJSID && loadRequest.status === WebView.LoadSucceededStatus) {
experimental.evaluateJavaScript(
jsSelector + ".scrollIntoView(true);");
//experimental.evaluateJavaScript(
// jsSelector + ".scrollIntoView(true);");
runJavaScript(jsSelector + ".scrollIntoView(true);");
}
if (enableJS && loadRequest.status === WebView.LoadSucceededStatus) {
experimental.evaluateJavaScript(js);
//experimental.evaluateJavaScript(js);
runJavaScript(js);
}
if (loadRequest && loadRequest.status === WebView.LoadSucceededStatus) {
busyIndicator.visible = false;
Expand All @@ -132,12 +134,12 @@ Item {
/**
* Open the middle clicked (or ctrl+clicked) link in the default browser
*/
onNavigationRequested: {
/*onNavigationRequested: {
if(isExternalLink){
request.action = WebView.IgnoreRequest;
Qt.openUrlExternally(request.url);
}
}
}*/

/**
* Display the context menu
Expand Down

0 comments on commit 1273c96

Please sign in to comment.