Verified Commit 23f97490 authored by Jonah Brüchert's avatar Jonah Brüchert
Browse files

Move drawers to correct parent

parent 08ba58f6
......@@ -46,7 +46,7 @@ ListView {
model: ListModel {
id: tabsModel
ListElement { pageurl: "https://plasma-mobile.org" }
ListElement { pageurl: "about:blank" }
}
delegate: WebView {
......
......@@ -189,7 +189,7 @@ WebEngineView {
//print("Load: " + loadRequest.errorCode + " " + loadRequest.errorString);
//if (loadRequest.status == WebEngineView.LoadStartedStatus) {
//}
if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
if (loadRequest.status === WebEngineView.LoadSucceededStatus) {
// record history, set current page info
//contentView.state = "hidden"
//pageInfo.url = webEngineView.url;
......@@ -200,7 +200,7 @@ WebEngineView {
addHistoryEntry();
}
if (loadRequest.status == WebEngineView.LoadFailedStatus) {
if (loadRequest.status === WebEngineView.LoadFailedStatus) {
print("Load failed: " + loadRequest.errorCode + " " + loadRequest.errorString);
ec = loadRequest.errorCode;
es = loadRequest.errorString;
......
......@@ -75,6 +75,56 @@ Kirigami.ApplicationWindow {
pageStack.globalToolBar.style: layerShown ? Kirigami.ApplicationHeaderStyle.Auto : Kirigami.ApplicationHeaderStyle.None
globalDrawer: Kirigami.GlobalDrawer {
id: globalDrawer
handleVisible: false
actions: [
Kirigami.Action {
icon.name: "tab-duplicate"
onTriggered: {
pageStack.layers.push("Tabs.qml")
}
text: i18n("Tabs")
},
Kirigami.Action {
icon.name: "view-private"
onTriggered: {
rootPage.privateMode ? rootPage.privateMode = false : rootPage.privateMode = true
}
text: rootPage.privateMode ? i18n("Leave private mode") : i18n("Private mode")
},
Kirigami.Action {
icon.name: "bookmarks"
onTriggered: {
pageStack.layers.push("Bookmarks.qml")
}
text: i18n("Bookmarks")
},
Kirigami.Action {
icon.name: "view-history"
onTriggered: {
pageStack.layers.push("History.qml")
}
text: i18n("History")
},
Kirigami.Action {
icon.name: "configure"
text: i18n("Settings")
onTriggered: {
pageStack.layers.push("Settings.qml")
}
}
]
}
contextDrawer: Kirigami.ContextDrawer {
id: contextDrawer
handleVisible: false
}
pageStack.initialPage: Kirigami.Page {
id: rootPage
leftPadding: 0
......@@ -247,56 +297,6 @@ Kirigami.ApplicationWindow {
id: shareSheet
}
Kirigami.ContextDrawer {
id: contextDrawer
handleVisible: false
}
Kirigami.GlobalDrawer {
id: globalDrawer
handleVisible: false
actions: [
Kirigami.Action {
icon.name: "tab-duplicate"
onTriggered: {
pageStack.layers.push("Tabs.qml")
}
text: i18n("Tabs")
},
Kirigami.Action {
icon.name: "view-private"
onTriggered: {
rootPage.privateMode ? rootPage.privateMode = false : rootPage.privateMode = true
}
text: rootPage.privateMode ? i18n("Leave private mode") : i18n("Private mode")
},
Kirigami.Action {
icon.name: "bookmarks"
onTriggered: {
pageStack.layers.push("Bookmarks.qml")
}
text: i18n("Bookmarks")
},
Kirigami.Action {
icon.name: "view-history"
onTriggered: {
pageStack.layers.push("History.qml")
}
text: i18n("History")
},
Kirigami.Action {
icon.name: "configure"
text: i18n("Settings")
onTriggered: {
pageStack.layers.push("Settings.qml")
}
}
]
}
// The menu at the top right
contextualActions: [
Kirigami.Action {
......
Markdown is supported
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